1/*
2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 University of Washington. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
17 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
19 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25 * THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28// DO NOT EDIT THIS FILE. It is automatically generated from CombinedDomains.json
29// by the script: Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
30
31#pragma once
32
33#include "InspectorBackendDispatcher.h"
34#include "InspectorProtocolObjects.h"
35#include <wtf/text/WTFString.h>
36
37namespace Inspector {
38
39typedef String ErrorString;
40
41#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
42class AlternateApplicationCacheBackendDispatcher;
43class AlternateAuditBackendDispatcher;
44#if ENABLE(RESOURCE_USAGE)
45class AlternateCPUProfilerBackendDispatcher;
46#endif // ENABLE(RESOURCE_USAGE)
47class AlternateCSSBackendDispatcher;
48class AlternateCanvasBackendDispatcher;
49class AlternateConsoleBackendDispatcher;
50class AlternateDOMBackendDispatcher;
51class AlternateDOMDebuggerBackendDispatcher;
52class AlternateDOMStorageBackendDispatcher;
53class AlternateDatabaseBackendDispatcher;
54class AlternateDebuggerBackendDispatcher;
55class AlternateHeapBackendDispatcher;
56#if ENABLE(INDEXED_DATABASE)
57class AlternateIndexedDBBackendDispatcher;
58#endif // ENABLE(INDEXED_DATABASE)
59class AlternateInspectorBackendDispatcher;
60class AlternateLayerTreeBackendDispatcher;
61#if ENABLE(RESOURCE_USAGE)
62class AlternateMemoryBackendDispatcher;
63#endif // ENABLE(RESOURCE_USAGE)
64class AlternateNetworkBackendDispatcher;
65class AlternatePageBackendDispatcher;
66class AlternateRuntimeBackendDispatcher;
67class AlternateScriptProfilerBackendDispatcher;
68class AlternateServiceWorkerBackendDispatcher;
69class AlternateTargetBackendDispatcher;
70class AlternateTimelineBackendDispatcher;
71class AlternateWorkerBackendDispatcher;
72#endif // ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
73
74class JS_EXPORT_PRIVATE ApplicationCacheBackendDispatcherHandler {
75public:
76 virtual void getFramesWithManifests(ErrorString&, RefPtr<JSON::ArrayOf<Inspector::Protocol::ApplicationCache::FrameWithManifest>>& out_frameIds) = 0;
77 virtual void enable(ErrorString&) = 0;
78 virtual void getManifestForFrame(ErrorString&, const String& in_frameId, String* out_manifestURL) = 0;
79 virtual void getApplicationCacheForFrame(ErrorString&, const String& in_frameId, RefPtr<Inspector::Protocol::ApplicationCache::ApplicationCache>& out_applicationCache) = 0;
80protected:
81 virtual ~ApplicationCacheBackendDispatcherHandler();
82};
83
84class JS_EXPORT_PRIVATE AuditBackendDispatcherHandler {
85public:
86 virtual void setup(ErrorString&, const int* opt_in_contextId) = 0;
87 virtual void run(ErrorString&, const String& in_test, const int* opt_in_contextId, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_result, Optional<bool>& opt_out_wasThrown) = 0;
88 virtual void teardown(ErrorString&) = 0;
89protected:
90 virtual ~AuditBackendDispatcherHandler();
91};
92
93#if ENABLE(RESOURCE_USAGE)
94class JS_EXPORT_PRIVATE CPUProfilerBackendDispatcherHandler {
95public:
96 virtual void startTracking(ErrorString&) = 0;
97 virtual void stopTracking(ErrorString&) = 0;
98protected:
99 virtual ~CPUProfilerBackendDispatcherHandler();
100};
101#endif // ENABLE(RESOURCE_USAGE)
102
103class JS_EXPORT_PRIVATE CSSBackendDispatcherHandler {
104public:
105 virtual void enable(ErrorString&) = 0;
106 virtual void disable(ErrorString&) = 0;
107 virtual void getMatchedStylesForNode(ErrorString&, int in_nodeId, const bool* opt_in_includePseudo, const bool* opt_in_includeInherited, RefPtr<JSON::ArrayOf<Inspector::Protocol::CSS::RuleMatch>>& opt_out_matchedCSSRules, RefPtr<JSON::ArrayOf<Inspector::Protocol::CSS::PseudoIdMatches>>& opt_out_pseudoElements, RefPtr<JSON::ArrayOf<Inspector::Protocol::CSS::InheritedStyleEntry>>& opt_out_inherited) = 0;
108 virtual void getInlineStylesForNode(ErrorString&, int in_nodeId, RefPtr<Inspector::Protocol::CSS::CSSStyle>& opt_out_inlineStyle, RefPtr<Inspector::Protocol::CSS::CSSStyle>& opt_out_attributesStyle) = 0;
109 virtual void getComputedStyleForNode(ErrorString&, int in_nodeId, RefPtr<JSON::ArrayOf<Inspector::Protocol::CSS::CSSComputedStyleProperty>>& out_computedStyle) = 0;
110 virtual void getAllStyleSheets(ErrorString&, RefPtr<JSON::ArrayOf<Inspector::Protocol::CSS::CSSStyleSheetHeader>>& out_headers) = 0;
111 virtual void getStyleSheet(ErrorString&, const String& in_styleSheetId, RefPtr<Inspector::Protocol::CSS::CSSStyleSheetBody>& out_styleSheet) = 0;
112 virtual void getStyleSheetText(ErrorString&, const String& in_styleSheetId, String* out_text) = 0;
113 virtual void setStyleSheetText(ErrorString&, const String& in_styleSheetId, const String& in_text) = 0;
114 virtual void setStyleText(ErrorString&, const JSON::Object& in_styleId, const String& in_text, RefPtr<Inspector::Protocol::CSS::CSSStyle>& out_style) = 0;
115 virtual void setRuleSelector(ErrorString&, const JSON::Object& in_ruleId, const String& in_selector, RefPtr<Inspector::Protocol::CSS::CSSRule>& out_rule) = 0;
116 virtual void createStyleSheet(ErrorString&, const String& in_frameId, String* out_styleSheetId) = 0;
117 virtual void addRule(ErrorString&, const String& in_styleSheetId, const String& in_selector, RefPtr<Inspector::Protocol::CSS::CSSRule>& out_rule) = 0;
118 virtual void getSupportedCSSProperties(ErrorString&, RefPtr<JSON::ArrayOf<Inspector::Protocol::CSS::CSSPropertyInfo>>& out_cssProperties) = 0;
119 virtual void getSupportedSystemFontFamilyNames(ErrorString&, RefPtr<JSON::ArrayOf<String>>& out_fontFamilyNames) = 0;
120 virtual void forcePseudoState(ErrorString&, int in_nodeId, const JSON::Array& in_forcedPseudoClasses) = 0;
121protected:
122 virtual ~CSSBackendDispatcherHandler();
123};
124
125class JS_EXPORT_PRIVATE CanvasBackendDispatcherHandler {
126public:
127 virtual void enable(ErrorString&) = 0;
128 virtual void disable(ErrorString&) = 0;
129 virtual void requestNode(ErrorString&, const String& in_canvasId, int* out_nodeId) = 0;
130 virtual void requestContent(ErrorString&, const String& in_canvasId, String* out_content) = 0;
131 virtual void requestCSSCanvasClientNodes(ErrorString&, const String& in_canvasId, RefPtr<JSON::ArrayOf<int>>& out_clientNodeIds) = 0;
132 virtual void resolveCanvasContext(ErrorString&, const String& in_canvasId, const String* opt_in_objectGroup, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_object) = 0;
133 virtual void setRecordingAutoCaptureFrameCount(ErrorString&, int in_count) = 0;
134 virtual void startRecording(ErrorString&, const String& in_canvasId, const int* opt_in_frameCount, const int* opt_in_memoryLimit) = 0;
135 virtual void stopRecording(ErrorString&, const String& in_canvasId) = 0;
136 virtual void requestShaderSource(ErrorString&, const String& in_programId, const String& in_shaderType, String* out_content) = 0;
137 virtual void updateShader(ErrorString&, const String& in_programId, const String& in_shaderType, const String& in_source) = 0;
138 virtual void setShaderProgramDisabled(ErrorString&, const String& in_programId, bool in_disabled) = 0;
139 virtual void setShaderProgramHighlighted(ErrorString&, const String& in_programId, bool in_highlighted) = 0;
140protected:
141 virtual ~CanvasBackendDispatcherHandler();
142};
143
144class JS_EXPORT_PRIVATE ConsoleBackendDispatcherHandler {
145public:
146 virtual void enable(ErrorString&) = 0;
147 virtual void disable(ErrorString&) = 0;
148 virtual void clearMessages(ErrorString&) = 0;
149 virtual void getLoggingChannels(ErrorString&, RefPtr<JSON::ArrayOf<Inspector::Protocol::Console::Channel>>& out_channels) = 0;
150 virtual void setLoggingChannelLevel(ErrorString&, const String& in_source, const String& in_level) = 0;
151protected:
152 virtual ~ConsoleBackendDispatcherHandler();
153};
154
155class JS_EXPORT_PRIVATE DOMBackendDispatcherHandler {
156public:
157 virtual void getDocument(ErrorString&, RefPtr<Inspector::Protocol::DOM::Node>& out_root) = 0;
158 virtual void requestChildNodes(ErrorString&, int in_nodeId, const int* opt_in_depth) = 0;
159 virtual void querySelector(ErrorString&, int in_nodeId, const String& in_selector, int* out_nodeId) = 0;
160 virtual void querySelectorAll(ErrorString&, int in_nodeId, const String& in_selector, RefPtr<JSON::ArrayOf<int>>& out_nodeIds) = 0;
161 virtual void setNodeName(ErrorString&, int in_nodeId, const String& in_name, int* out_nodeId) = 0;
162 virtual void setNodeValue(ErrorString&, int in_nodeId, const String& in_value) = 0;
163 virtual void removeNode(ErrorString&, int in_nodeId) = 0;
164 virtual void setAttributeValue(ErrorString&, int in_nodeId, const String& in_name, const String& in_value) = 0;
165 virtual void setAttributesAsText(ErrorString&, int in_nodeId, const String& in_text, const String* opt_in_name) = 0;
166 virtual void removeAttribute(ErrorString&, int in_nodeId, const String& in_name) = 0;
167 virtual void getSupportedEventNames(ErrorString&, RefPtr<JSON::ArrayOf<String>>& out_eventNames) = 0;
168 virtual void getDataBindingsForNode(ErrorString&, int in_nodeId, RefPtr<JSON::ArrayOf<Inspector::Protocol::DOM::DataBinding>>& out_dataBindings) = 0;
169 virtual void getAssociatedDataForNode(ErrorString&, int in_nodeId, Optional<String>& opt_out_associatedData) = 0;
170 virtual void getEventListenersForNode(ErrorString&, int in_nodeId, RefPtr<JSON::ArrayOf<Inspector::Protocol::DOM::EventListener>>& out_listeners) = 0;
171 virtual void setEventListenerDisabled(ErrorString&, int in_eventListenerId, bool in_disabled) = 0;
172 virtual void setBreakpointForEventListener(ErrorString&, int in_eventListenerId) = 0;
173 virtual void removeBreakpointForEventListener(ErrorString&, int in_eventListenerId) = 0;
174 virtual void getAccessibilityPropertiesForNode(ErrorString&, int in_nodeId, RefPtr<Inspector::Protocol::DOM::AccessibilityProperties>& out_properties) = 0;
175 virtual void getOuterHTML(ErrorString&, int in_nodeId, String* out_outerHTML) = 0;
176 virtual void setOuterHTML(ErrorString&, int in_nodeId, const String& in_outerHTML) = 0;
177 virtual void insertAdjacentHTML(ErrorString&, int in_nodeId, const String& in_position, const String& in_html) = 0;
178 virtual void performSearch(ErrorString&, const String& in_query, const JSON::Array* opt_in_nodeIds, const bool* opt_in_caseSensitive, String* out_searchId, int* out_resultCount) = 0;
179 virtual void getSearchResults(ErrorString&, const String& in_searchId, int in_fromIndex, int in_toIndex, RefPtr<JSON::ArrayOf<int>>& out_nodeIds) = 0;
180 virtual void discardSearchResults(ErrorString&, const String& in_searchId) = 0;
181 virtual void requestNode(ErrorString&, const String& in_objectId, int* out_nodeId) = 0;
182 virtual void setInspectModeEnabled(ErrorString&, bool in_enabled, const JSON::Object* opt_in_highlightConfig) = 0;
183 virtual void highlightRect(ErrorString&, int in_x, int in_y, int in_width, int in_height, const JSON::Object* opt_in_color, const JSON::Object* opt_in_outlineColor, const bool* opt_in_usePageCoordinates) = 0;
184 virtual void highlightQuad(ErrorString&, const JSON::Array& in_quad, const JSON::Object* opt_in_color, const JSON::Object* opt_in_outlineColor, const bool* opt_in_usePageCoordinates) = 0;
185 virtual void highlightSelector(ErrorString&, const JSON::Object& in_highlightConfig, const String& in_selectorString, const String* opt_in_frameId) = 0;
186 virtual void highlightNode(ErrorString&, const JSON::Object& in_highlightConfig, const int* opt_in_nodeId, const String* opt_in_objectId) = 0;
187 virtual void highlightNodeList(ErrorString&, const JSON::Array& in_nodeIds, const JSON::Object& in_highlightConfig) = 0;
188 virtual void hideHighlight(ErrorString&) = 0;
189 virtual void highlightFrame(ErrorString&, const String& in_frameId, const JSON::Object* opt_in_contentColor, const JSON::Object* opt_in_contentOutlineColor) = 0;
190 virtual void pushNodeByPathToFrontend(ErrorString&, const String& in_path, int* out_nodeId) = 0;
191 virtual void resolveNode(ErrorString&, int in_nodeId, const String* opt_in_objectGroup, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_object) = 0;
192 virtual void getAttributes(ErrorString&, int in_nodeId, RefPtr<JSON::ArrayOf<String>>& out_attributes) = 0;
193 virtual void moveTo(ErrorString&, int in_nodeId, int in_targetNodeId, const int* opt_in_insertBeforeNodeId, int* out_nodeId) = 0;
194 virtual void undo(ErrorString&) = 0;
195 virtual void redo(ErrorString&) = 0;
196 virtual void markUndoableState(ErrorString&) = 0;
197 virtual void focus(ErrorString&, int in_nodeId) = 0;
198 virtual void setInspectedNode(ErrorString&, int in_nodeId) = 0;
199protected:
200 virtual ~DOMBackendDispatcherHandler();
201};
202
203class JS_EXPORT_PRIVATE DOMDebuggerBackendDispatcherHandler {
204public:
205 virtual void setDOMBreakpoint(ErrorString&, int in_nodeId, const String& in_type) = 0;
206 virtual void removeDOMBreakpoint(ErrorString&, int in_nodeId, const String& in_type) = 0;
207 virtual void setEventBreakpoint(ErrorString&, const String& in_breakpointType, const String& in_eventName) = 0;
208 virtual void removeEventBreakpoint(ErrorString&, const String& in_breakpointType, const String& in_eventName) = 0;
209 virtual void setURLBreakpoint(ErrorString&, const String& in_url, const bool* opt_in_isRegex) = 0;
210 virtual void removeURLBreakpoint(ErrorString&, const String& in_url) = 0;
211protected:
212 virtual ~DOMDebuggerBackendDispatcherHandler();
213};
214
215class JS_EXPORT_PRIVATE DOMStorageBackendDispatcherHandler {
216public:
217 virtual void enable(ErrorString&) = 0;
218 virtual void disable(ErrorString&) = 0;
219 virtual void getDOMStorageItems(ErrorString&, const JSON::Object& in_storageId, RefPtr<JSON::ArrayOf<Inspector::Protocol::DOMStorage::Item>>& out_entries) = 0;
220 virtual void setDOMStorageItem(ErrorString&, const JSON::Object& in_storageId, const String& in_key, const String& in_value) = 0;
221 virtual void removeDOMStorageItem(ErrorString&, const JSON::Object& in_storageId, const String& in_key) = 0;
222protected:
223 virtual ~DOMStorageBackendDispatcherHandler();
224};
225
226class JS_EXPORT_PRIVATE DatabaseBackendDispatcherHandler {
227public:
228 virtual void enable(ErrorString&) = 0;
229 virtual void disable(ErrorString&) = 0;
230 virtual void getDatabaseTableNames(ErrorString&, const String& in_databaseId, RefPtr<JSON::ArrayOf<String>>& out_tableNames) = 0;
231 class JS_EXPORT_PRIVATE ExecuteSQLCallback : public BackendDispatcher::CallbackBase {
232 public:
233 ExecuteSQLCallback(Ref<BackendDispatcher>&&, int id);
234 void sendSuccess(RefPtr<JSON::ArrayOf<String>>&& columnNames, RefPtr<JSON::ArrayOf<JSON::Value>>&& values, RefPtr<Inspector::Protocol::Database::Error>&& sqlError);
235 };
236 virtual void executeSQL(const String& in_databaseId, const String& in_query, Ref<ExecuteSQLCallback>&& callback) = 0;
237protected:
238 virtual ~DatabaseBackendDispatcherHandler();
239};
240
241class JS_EXPORT_PRIVATE DebuggerBackendDispatcherHandler {
242public:
243 virtual void enable(ErrorString&) = 0;
244 virtual void disable(ErrorString&) = 0;
245 virtual void setAsyncStackTraceDepth(ErrorString&, int in_depth) = 0;
246 virtual void setBreakpointsActive(ErrorString&, bool in_active) = 0;
247 virtual void setBreakpointByUrl(ErrorString&, int in_lineNumber, const String* opt_in_url, const String* opt_in_urlRegex, const int* opt_in_columnNumber, const JSON::Object* opt_in_options, String* out_breakpointId, RefPtr<JSON::ArrayOf<Inspector::Protocol::Debugger::Location>>& out_locations) = 0;
248 virtual void setBreakpoint(ErrorString&, const JSON::Object& in_location, const JSON::Object* opt_in_options, String* out_breakpointId, RefPtr<Inspector::Protocol::Debugger::Location>& out_actualLocation) = 0;
249 virtual void removeBreakpoint(ErrorString&, const String& in_breakpointId) = 0;
250 virtual void continueUntilNextRunLoop(ErrorString&) = 0;
251 virtual void continueToLocation(ErrorString&, const JSON::Object& in_location) = 0;
252 virtual void stepOver(ErrorString&) = 0;
253 virtual void stepInto(ErrorString&) = 0;
254 virtual void stepOut(ErrorString&) = 0;
255 virtual void pause(ErrorString&) = 0;
256 virtual void resume(ErrorString&) = 0;
257 virtual void searchInContent(ErrorString&, const String& in_scriptId, const String& in_query, const bool* opt_in_caseSensitive, const bool* opt_in_isRegex, RefPtr<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>& out_result) = 0;
258 virtual void getScriptSource(ErrorString&, const String& in_scriptId, String* out_scriptSource) = 0;
259 virtual void getFunctionDetails(ErrorString&, const String& in_functionId, RefPtr<Inspector::Protocol::Debugger::FunctionDetails>& out_details) = 0;
260 // Named after parameter 'state' while generating command/event setPauseOnExceptions.
261 enum class State {
262 None = 171,
263 Uncaught = 217,
264 All = 218,
265 }; // enum class State
266 virtual void setPauseOnExceptions(ErrorString&, const String& in_state) = 0;
267 virtual void setPauseOnAssertions(ErrorString&, bool in_enabled) = 0;
268 virtual void setPauseForInternalScripts(ErrorString&, bool in_shouldPause) = 0;
269 virtual void evaluateOnCallFrame(ErrorString&, const String& in_callFrameId, const String& in_expression, const String* opt_in_objectGroup, const bool* opt_in_includeCommandLineAPI, const bool* opt_in_doNotPauseOnExceptionsAndMuteConsole, const bool* opt_in_returnByValue, const bool* opt_in_generatePreview, const bool* opt_in_saveResult, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_result, Optional<bool>& opt_out_wasThrown, Optional<int>& opt_out_savedResultIndex) = 0;
270protected:
271 virtual ~DebuggerBackendDispatcherHandler();
272};
273
274class JS_EXPORT_PRIVATE HeapBackendDispatcherHandler {
275public:
276 virtual void enable(ErrorString&) = 0;
277 virtual void disable(ErrorString&) = 0;
278 virtual void gc(ErrorString&) = 0;
279 virtual void snapshot(ErrorString&, double* out_timestamp, String* out_snapshotData) = 0;
280 virtual void startTracking(ErrorString&) = 0;
281 virtual void stopTracking(ErrorString&) = 0;
282 virtual void getPreview(ErrorString&, int in_heapObjectId, Optional<String>& opt_out_string, RefPtr<Inspector::Protocol::Debugger::FunctionDetails>& opt_out_functionDetails, RefPtr<Inspector::Protocol::Runtime::ObjectPreview>& opt_out_preview) = 0;
283 virtual void getRemoteObject(ErrorString&, int in_heapObjectId, const String* opt_in_objectGroup, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_result) = 0;
284protected:
285 virtual ~HeapBackendDispatcherHandler();
286};
287
288#if ENABLE(INDEXED_DATABASE)
289class JS_EXPORT_PRIVATE IndexedDBBackendDispatcherHandler {
290public:
291 virtual void enable(ErrorString&) = 0;
292 virtual void disable(ErrorString&) = 0;
293 class JS_EXPORT_PRIVATE RequestDatabaseNamesCallback : public BackendDispatcher::CallbackBase {
294 public:
295 RequestDatabaseNamesCallback(Ref<BackendDispatcher>&&, int id);
296 void sendSuccess(RefPtr<JSON::ArrayOf<String>>&& databaseNames);
297 };
298 virtual void requestDatabaseNames(const String& in_securityOrigin, Ref<RequestDatabaseNamesCallback>&& callback) = 0;
299 class JS_EXPORT_PRIVATE RequestDatabaseCallback : public BackendDispatcher::CallbackBase {
300 public:
301 RequestDatabaseCallback(Ref<BackendDispatcher>&&, int id);
302 void sendSuccess(RefPtr<Inspector::Protocol::IndexedDB::DatabaseWithObjectStores>&& databaseWithObjectStores);
303 };
304 virtual void requestDatabase(const String& in_securityOrigin, const String& in_databaseName, Ref<RequestDatabaseCallback>&& callback) = 0;
305 class JS_EXPORT_PRIVATE RequestDataCallback : public BackendDispatcher::CallbackBase {
306 public:
307 RequestDataCallback(Ref<BackendDispatcher>&&, int id);
308 void sendSuccess(RefPtr<JSON::ArrayOf<Inspector::Protocol::IndexedDB::DataEntry>>&& objectStoreDataEntries, bool hasMore);
309 };
310 virtual void requestData(const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, const String& in_indexName, int in_skipCount, int in_pageSize, const JSON::Object* opt_in_keyRange, Ref<RequestDataCallback>&& callback) = 0;
311 class JS_EXPORT_PRIVATE ClearObjectStoreCallback : public BackendDispatcher::CallbackBase {
312 public:
313 ClearObjectStoreCallback(Ref<BackendDispatcher>&&, int id);
314 void sendSuccess();
315 };
316 virtual void clearObjectStore(const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, Ref<ClearObjectStoreCallback>&& callback) = 0;
317protected:
318 virtual ~IndexedDBBackendDispatcherHandler();
319};
320#endif // ENABLE(INDEXED_DATABASE)
321
322class JS_EXPORT_PRIVATE InspectorBackendDispatcherHandler {
323public:
324 virtual void enable(ErrorString&) = 0;
325 virtual void disable(ErrorString&) = 0;
326 virtual void initialized(ErrorString&) = 0;
327protected:
328 virtual ~InspectorBackendDispatcherHandler();
329};
330
331class JS_EXPORT_PRIVATE LayerTreeBackendDispatcherHandler {
332public:
333 virtual void enable(ErrorString&) = 0;
334 virtual void disable(ErrorString&) = 0;
335 virtual void layersForNode(ErrorString&, int in_nodeId, RefPtr<JSON::ArrayOf<Inspector::Protocol::LayerTree::Layer>>& out_layers) = 0;
336 virtual void reasonsForCompositingLayer(ErrorString&, const String& in_layerId, RefPtr<Inspector::Protocol::LayerTree::CompositingReasons>& out_compositingReasons) = 0;
337protected:
338 virtual ~LayerTreeBackendDispatcherHandler();
339};
340
341#if ENABLE(RESOURCE_USAGE)
342class JS_EXPORT_PRIVATE MemoryBackendDispatcherHandler {
343public:
344 virtual void enable(ErrorString&) = 0;
345 virtual void disable(ErrorString&) = 0;
346 virtual void startTracking(ErrorString&) = 0;
347 virtual void stopTracking(ErrorString&) = 0;
348protected:
349 virtual ~MemoryBackendDispatcherHandler();
350};
351#endif // ENABLE(RESOURCE_USAGE)
352
353class JS_EXPORT_PRIVATE NetworkBackendDispatcherHandler {
354public:
355 virtual void enable(ErrorString&) = 0;
356 virtual void disable(ErrorString&) = 0;
357 virtual void setExtraHTTPHeaders(ErrorString&, const JSON::Object& in_headers) = 0;
358 virtual void getResponseBody(ErrorString&, const String& in_requestId, String* out_body, bool* out_base64Encoded) = 0;
359 virtual void setResourceCachingDisabled(ErrorString&, bool in_disabled) = 0;
360 class JS_EXPORT_PRIVATE LoadResourceCallback : public BackendDispatcher::CallbackBase {
361 public:
362 LoadResourceCallback(Ref<BackendDispatcher>&&, int id);
363 void sendSuccess(const String& content, const String& mimeType, int status);
364 };
365 virtual void loadResource(const String& in_frameId, const String& in_url, Ref<LoadResourceCallback>&& callback) = 0;
366 virtual void getSerializedCertificate(ErrorString&, const String& in_requestId, String* out_serializedCertificate) = 0;
367 virtual void resolveWebSocket(ErrorString&, const String& in_requestId, const String* opt_in_objectGroup, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_object) = 0;
368protected:
369 virtual ~NetworkBackendDispatcherHandler();
370};
371
372class JS_EXPORT_PRIVATE PageBackendDispatcherHandler {
373public:
374 virtual void enable(ErrorString&) = 0;
375 virtual void disable(ErrorString&) = 0;
376 virtual void reload(ErrorString&, const bool* opt_in_ignoreCache, const bool* opt_in_revalidateAllResources) = 0;
377 virtual void navigate(ErrorString&, const String& in_url) = 0;
378 virtual void overrideUserAgent(ErrorString&, const String* opt_in_value) = 0;
379 virtual void overrideSetting(ErrorString&, const String& in_setting, const bool* opt_in_value) = 0;
380 virtual void getCookies(ErrorString&, RefPtr<JSON::ArrayOf<Inspector::Protocol::Page::Cookie>>& out_cookies) = 0;
381 virtual void deleteCookie(ErrorString&, const String& in_cookieName, const String& in_url) = 0;
382 virtual void getResourceTree(ErrorString&, RefPtr<Inspector::Protocol::Page::FrameResourceTree>& out_frameTree) = 0;
383 virtual void getResourceContent(ErrorString&, const String& in_frameId, const String& in_url, String* out_content, bool* out_base64Encoded) = 0;
384 virtual void searchInResource(ErrorString&, const String& in_frameId, const String& in_url, const String& in_query, const bool* opt_in_caseSensitive, const bool* opt_in_isRegex, const String* opt_in_requestId, RefPtr<JSON::ArrayOf<Inspector::Protocol::GenericTypes::SearchMatch>>& out_result) = 0;
385 virtual void searchInResources(ErrorString&, const String& in_text, const bool* opt_in_caseSensitive, const bool* opt_in_isRegex, RefPtr<JSON::ArrayOf<Inspector::Protocol::Page::SearchResult>>& out_result) = 0;
386 virtual void setShowRulers(ErrorString&, bool in_result) = 0;
387 virtual void setShowPaintRects(ErrorString&, bool in_result) = 0;
388 virtual void setEmulatedMedia(ErrorString&, const String& in_media) = 0;
389 virtual void setForcedAppearance(ErrorString&, const String& in_appearance) = 0;
390 virtual void getCompositingBordersVisible(ErrorString&, bool* out_result) = 0;
391 virtual void setCompositingBordersVisible(ErrorString&, bool in_visible) = 0;
392 virtual void snapshotNode(ErrorString&, int in_nodeId, String* out_dataURL) = 0;
393 virtual void snapshotRect(ErrorString&, int in_x, int in_y, int in_width, int in_height, const String& in_coordinateSystem, String* out_dataURL) = 0;
394 virtual void archive(ErrorString&, String* out_data) = 0;
395protected:
396 virtual ~PageBackendDispatcherHandler();
397};
398
399class JS_EXPORT_PRIVATE RuntimeBackendDispatcherHandler {
400public:
401 virtual void parse(ErrorString&, const String& in_source, Inspector::Protocol::Runtime::SyntaxErrorType* out_result, Optional<String>& opt_out_message, RefPtr<Inspector::Protocol::Runtime::ErrorRange>& opt_out_range) = 0;
402 virtual void evaluate(ErrorString&, const String& in_expression, const String* opt_in_objectGroup, const bool* opt_in_includeCommandLineAPI, const bool* opt_in_doNotPauseOnExceptionsAndMuteConsole, const int* opt_in_contextId, const bool* opt_in_returnByValue, const bool* opt_in_generatePreview, const bool* opt_in_saveResult, const bool* opt_in_emulateUserGesture, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_result, Optional<bool>& opt_out_wasThrown, Optional<int>& opt_out_savedResultIndex) = 0;
403 class JS_EXPORT_PRIVATE AwaitPromiseCallback : public BackendDispatcher::CallbackBase {
404 public:
405 AwaitPromiseCallback(Ref<BackendDispatcher>&&, int id);
406 void sendSuccess(RefPtr<Inspector::Protocol::Runtime::RemoteObject>&& result, Optional<bool>& wasThrown, Optional<int>& savedResultIndex);
407 };
408 virtual void awaitPromise(const String& in_promiseObjectId, const bool* opt_in_returnByValue, const bool* opt_in_generatePreview, const bool* opt_in_saveResult, Ref<AwaitPromiseCallback>&& callback) = 0;
409 virtual void callFunctionOn(ErrorString&, const String& in_objectId, const String& in_functionDeclaration, const JSON::Array* opt_in_arguments, const bool* opt_in_doNotPauseOnExceptionsAndMuteConsole, const bool* opt_in_returnByValue, const bool* opt_in_generatePreview, RefPtr<Inspector::Protocol::Runtime::RemoteObject>& out_result, Optional<bool>& opt_out_wasThrown) = 0;
410 virtual void getPreview(ErrorString&, const String& in_objectId, RefPtr<Inspector::Protocol::Runtime::ObjectPreview>& out_preview) = 0;
411 virtual void getProperties(ErrorString&, const String& in_objectId, const bool* opt_in_ownProperties, const bool* opt_in_generatePreview, RefPtr<JSON::ArrayOf<Inspector::Protocol::Runtime::PropertyDescriptor>>& out_result, RefPtr<JSON::ArrayOf<Inspector::Protocol::Runtime::InternalPropertyDescriptor>>& opt_out_internalProperties) = 0;
412 virtual void getDisplayableProperties(ErrorString&, const String& in_objectId, const bool* opt_in_generatePreview, RefPtr<JSON::ArrayOf<Inspector::Protocol::Runtime::PropertyDescriptor>>& out_properties, RefPtr<JSON::ArrayOf<Inspector::Protocol::Runtime::InternalPropertyDescriptor>>& opt_out_internalProperties) = 0;
413 virtual void getCollectionEntries(ErrorString&, const String& in_objectId, const String* opt_in_objectGroup, const int* opt_in_startIndex, const int* opt_in_numberToFetch, RefPtr<JSON::ArrayOf<Inspector::Protocol::Runtime::CollectionEntry>>& out_entries) = 0;
414 virtual void saveResult(ErrorString&, const JSON::Object& in_value, const int* opt_in_contextId, Optional<int>& opt_out_savedResultIndex) = 0;
415 virtual void releaseObject(ErrorString&, const String& in_objectId) = 0;
416 virtual void releaseObjectGroup(ErrorString&, const String& in_objectGroup) = 0;
417 virtual void enable(ErrorString&) = 0;
418 virtual void disable(ErrorString&) = 0;
419 virtual void getRuntimeTypesForVariablesAtOffsets(ErrorString&, const JSON::Array& in_locations, RefPtr<JSON::ArrayOf<Inspector::Protocol::Runtime::TypeDescription>>& out_types) = 0;
420 virtual void enableTypeProfiler(ErrorString&) = 0;
421 virtual void disableTypeProfiler(ErrorString&) = 0;
422 virtual void enableControlFlowProfiler(ErrorString&) = 0;
423 virtual void disableControlFlowProfiler(ErrorString&) = 0;
424 virtual void getBasicBlocks(ErrorString&, const String& in_sourceID, RefPtr<JSON::ArrayOf<Inspector::Protocol::Runtime::BasicBlock>>& out_basicBlocks) = 0;
425protected:
426 virtual ~RuntimeBackendDispatcherHandler();
427};
428
429class JS_EXPORT_PRIVATE ScriptProfilerBackendDispatcherHandler {
430public:
431 virtual void startTracking(ErrorString&, const bool* opt_in_includeSamples) = 0;
432 virtual void stopTracking(ErrorString&) = 0;
433protected:
434 virtual ~ScriptProfilerBackendDispatcherHandler();
435};
436
437class JS_EXPORT_PRIVATE ServiceWorkerBackendDispatcherHandler {
438public:
439 virtual void getInitializationInfo(ErrorString&, RefPtr<Inspector::Protocol::ServiceWorker::Configuration>& out_info) = 0;
440protected:
441 virtual ~ServiceWorkerBackendDispatcherHandler();
442};
443
444class JS_EXPORT_PRIVATE TargetBackendDispatcherHandler {
445public:
446 virtual void exists(ErrorString&) = 0;
447 virtual void sendMessageToTarget(ErrorString&, const String& in_targetId, const String& in_message) = 0;
448protected:
449 virtual ~TargetBackendDispatcherHandler();
450};
451
452class JS_EXPORT_PRIVATE TimelineBackendDispatcherHandler {
453public:
454 virtual void start(ErrorString&, const int* opt_in_maxCallStackDepth) = 0;
455 virtual void stop(ErrorString&) = 0;
456 virtual void setAutoCaptureEnabled(ErrorString&, bool in_enabled) = 0;
457 virtual void setInstruments(ErrorString&, const JSON::Array& in_instruments) = 0;
458protected:
459 virtual ~TimelineBackendDispatcherHandler();
460};
461
462class JS_EXPORT_PRIVATE WorkerBackendDispatcherHandler {
463public:
464 virtual void enable(ErrorString&) = 0;
465 virtual void disable(ErrorString&) = 0;
466 virtual void initialized(ErrorString&, const String& in_workerId) = 0;
467 virtual void sendMessageToWorker(ErrorString&, const String& in_workerId, const String& in_message) = 0;
468protected:
469 virtual ~WorkerBackendDispatcherHandler();
470};
471
472class JS_EXPORT_PRIVATE ApplicationCacheBackendDispatcher final : public SupplementalBackendDispatcher {
473public:
474 static Ref<ApplicationCacheBackendDispatcher> create(BackendDispatcher&, ApplicationCacheBackendDispatcherHandler*);
475 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
476private:
477 void getFramesWithManifests(long requestId, RefPtr<JSON::Object>&& parameters);
478 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
479 void getManifestForFrame(long requestId, RefPtr<JSON::Object>&& parameters);
480 void getApplicationCacheForFrame(long requestId, RefPtr<JSON::Object>&& parameters);
481#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
482public:
483 void setAlternateDispatcher(AlternateApplicationCacheBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
484private:
485 AlternateApplicationCacheBackendDispatcher* m_alternateDispatcher { nullptr };
486#endif
487private:
488 ApplicationCacheBackendDispatcher(BackendDispatcher&, ApplicationCacheBackendDispatcherHandler*);
489 ApplicationCacheBackendDispatcherHandler* m_agent { nullptr };
490};
491
492class JS_EXPORT_PRIVATE AuditBackendDispatcher final : public SupplementalBackendDispatcher {
493public:
494 static Ref<AuditBackendDispatcher> create(BackendDispatcher&, AuditBackendDispatcherHandler*);
495 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
496private:
497 void setup(long requestId, RefPtr<JSON::Object>&& parameters);
498 void run(long requestId, RefPtr<JSON::Object>&& parameters);
499 void teardown(long requestId, RefPtr<JSON::Object>&& parameters);
500#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
501public:
502 void setAlternateDispatcher(AlternateAuditBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
503private:
504 AlternateAuditBackendDispatcher* m_alternateDispatcher { nullptr };
505#endif
506private:
507 AuditBackendDispatcher(BackendDispatcher&, AuditBackendDispatcherHandler*);
508 AuditBackendDispatcherHandler* m_agent { nullptr };
509};
510
511#if ENABLE(RESOURCE_USAGE)
512class JS_EXPORT_PRIVATE CPUProfilerBackendDispatcher final : public SupplementalBackendDispatcher {
513public:
514 static Ref<CPUProfilerBackendDispatcher> create(BackendDispatcher&, CPUProfilerBackendDispatcherHandler*);
515 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
516private:
517 void startTracking(long requestId, RefPtr<JSON::Object>&& parameters);
518 void stopTracking(long requestId, RefPtr<JSON::Object>&& parameters);
519#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
520public:
521 void setAlternateDispatcher(AlternateCPUProfilerBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
522private:
523 AlternateCPUProfilerBackendDispatcher* m_alternateDispatcher { nullptr };
524#endif
525private:
526 CPUProfilerBackendDispatcher(BackendDispatcher&, CPUProfilerBackendDispatcherHandler*);
527 CPUProfilerBackendDispatcherHandler* m_agent { nullptr };
528};
529#endif // ENABLE(RESOURCE_USAGE)
530
531class JS_EXPORT_PRIVATE CSSBackendDispatcher final : public SupplementalBackendDispatcher {
532public:
533 static Ref<CSSBackendDispatcher> create(BackendDispatcher&, CSSBackendDispatcherHandler*);
534 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
535private:
536 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
537 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
538 void getMatchedStylesForNode(long requestId, RefPtr<JSON::Object>&& parameters);
539 void getInlineStylesForNode(long requestId, RefPtr<JSON::Object>&& parameters);
540 void getComputedStyleForNode(long requestId, RefPtr<JSON::Object>&& parameters);
541 void getAllStyleSheets(long requestId, RefPtr<JSON::Object>&& parameters);
542 void getStyleSheet(long requestId, RefPtr<JSON::Object>&& parameters);
543 void getStyleSheetText(long requestId, RefPtr<JSON::Object>&& parameters);
544 void setStyleSheetText(long requestId, RefPtr<JSON::Object>&& parameters);
545 void setStyleText(long requestId, RefPtr<JSON::Object>&& parameters);
546 void setRuleSelector(long requestId, RefPtr<JSON::Object>&& parameters);
547 void createStyleSheet(long requestId, RefPtr<JSON::Object>&& parameters);
548 void addRule(long requestId, RefPtr<JSON::Object>&& parameters);
549 void getSupportedCSSProperties(long requestId, RefPtr<JSON::Object>&& parameters);
550 void getSupportedSystemFontFamilyNames(long requestId, RefPtr<JSON::Object>&& parameters);
551 void forcePseudoState(long requestId, RefPtr<JSON::Object>&& parameters);
552#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
553public:
554 void setAlternateDispatcher(AlternateCSSBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
555private:
556 AlternateCSSBackendDispatcher* m_alternateDispatcher { nullptr };
557#endif
558private:
559 CSSBackendDispatcher(BackendDispatcher&, CSSBackendDispatcherHandler*);
560 CSSBackendDispatcherHandler* m_agent { nullptr };
561};
562
563class JS_EXPORT_PRIVATE CanvasBackendDispatcher final : public SupplementalBackendDispatcher {
564public:
565 static Ref<CanvasBackendDispatcher> create(BackendDispatcher&, CanvasBackendDispatcherHandler*);
566 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
567private:
568 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
569 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
570 void requestNode(long requestId, RefPtr<JSON::Object>&& parameters);
571 void requestContent(long requestId, RefPtr<JSON::Object>&& parameters);
572 void requestCSSCanvasClientNodes(long requestId, RefPtr<JSON::Object>&& parameters);
573 void resolveCanvasContext(long requestId, RefPtr<JSON::Object>&& parameters);
574 void setRecordingAutoCaptureFrameCount(long requestId, RefPtr<JSON::Object>&& parameters);
575 void startRecording(long requestId, RefPtr<JSON::Object>&& parameters);
576 void stopRecording(long requestId, RefPtr<JSON::Object>&& parameters);
577 void requestShaderSource(long requestId, RefPtr<JSON::Object>&& parameters);
578 void updateShader(long requestId, RefPtr<JSON::Object>&& parameters);
579 void setShaderProgramDisabled(long requestId, RefPtr<JSON::Object>&& parameters);
580 void setShaderProgramHighlighted(long requestId, RefPtr<JSON::Object>&& parameters);
581#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
582public:
583 void setAlternateDispatcher(AlternateCanvasBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
584private:
585 AlternateCanvasBackendDispatcher* m_alternateDispatcher { nullptr };
586#endif
587private:
588 CanvasBackendDispatcher(BackendDispatcher&, CanvasBackendDispatcherHandler*);
589 CanvasBackendDispatcherHandler* m_agent { nullptr };
590};
591
592class JS_EXPORT_PRIVATE ConsoleBackendDispatcher final : public SupplementalBackendDispatcher {
593public:
594 static Ref<ConsoleBackendDispatcher> create(BackendDispatcher&, ConsoleBackendDispatcherHandler*);
595 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
596private:
597 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
598 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
599 void clearMessages(long requestId, RefPtr<JSON::Object>&& parameters);
600 void getLoggingChannels(long requestId, RefPtr<JSON::Object>&& parameters);
601 void setLoggingChannelLevel(long requestId, RefPtr<JSON::Object>&& parameters);
602#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
603public:
604 void setAlternateDispatcher(AlternateConsoleBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
605private:
606 AlternateConsoleBackendDispatcher* m_alternateDispatcher { nullptr };
607#endif
608private:
609 ConsoleBackendDispatcher(BackendDispatcher&, ConsoleBackendDispatcherHandler*);
610 ConsoleBackendDispatcherHandler* m_agent { nullptr };
611};
612
613class JS_EXPORT_PRIVATE DOMBackendDispatcher final : public SupplementalBackendDispatcher {
614public:
615 static Ref<DOMBackendDispatcher> create(BackendDispatcher&, DOMBackendDispatcherHandler*);
616 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
617private:
618 void getDocument(long requestId, RefPtr<JSON::Object>&& parameters);
619 void requestChildNodes(long requestId, RefPtr<JSON::Object>&& parameters);
620 void querySelector(long requestId, RefPtr<JSON::Object>&& parameters);
621 void querySelectorAll(long requestId, RefPtr<JSON::Object>&& parameters);
622 void setNodeName(long requestId, RefPtr<JSON::Object>&& parameters);
623 void setNodeValue(long requestId, RefPtr<JSON::Object>&& parameters);
624 void removeNode(long requestId, RefPtr<JSON::Object>&& parameters);
625 void setAttributeValue(long requestId, RefPtr<JSON::Object>&& parameters);
626 void setAttributesAsText(long requestId, RefPtr<JSON::Object>&& parameters);
627 void removeAttribute(long requestId, RefPtr<JSON::Object>&& parameters);
628 void getSupportedEventNames(long requestId, RefPtr<JSON::Object>&& parameters);
629 void getDataBindingsForNode(long requestId, RefPtr<JSON::Object>&& parameters);
630 void getAssociatedDataForNode(long requestId, RefPtr<JSON::Object>&& parameters);
631 void getEventListenersForNode(long requestId, RefPtr<JSON::Object>&& parameters);
632 void setEventListenerDisabled(long requestId, RefPtr<JSON::Object>&& parameters);
633 void setBreakpointForEventListener(long requestId, RefPtr<JSON::Object>&& parameters);
634 void removeBreakpointForEventListener(long requestId, RefPtr<JSON::Object>&& parameters);
635 void getAccessibilityPropertiesForNode(long requestId, RefPtr<JSON::Object>&& parameters);
636 void getOuterHTML(long requestId, RefPtr<JSON::Object>&& parameters);
637 void setOuterHTML(long requestId, RefPtr<JSON::Object>&& parameters);
638 void insertAdjacentHTML(long requestId, RefPtr<JSON::Object>&& parameters);
639 void performSearch(long requestId, RefPtr<JSON::Object>&& parameters);
640 void getSearchResults(long requestId, RefPtr<JSON::Object>&& parameters);
641 void discardSearchResults(long requestId, RefPtr<JSON::Object>&& parameters);
642 void requestNode(long requestId, RefPtr<JSON::Object>&& parameters);
643 void setInspectModeEnabled(long requestId, RefPtr<JSON::Object>&& parameters);
644 void highlightRect(long requestId, RefPtr<JSON::Object>&& parameters);
645 void highlightQuad(long requestId, RefPtr<JSON::Object>&& parameters);
646 void highlightSelector(long requestId, RefPtr<JSON::Object>&& parameters);
647 void highlightNode(long requestId, RefPtr<JSON::Object>&& parameters);
648 void highlightNodeList(long requestId, RefPtr<JSON::Object>&& parameters);
649 void hideHighlight(long requestId, RefPtr<JSON::Object>&& parameters);
650 void highlightFrame(long requestId, RefPtr<JSON::Object>&& parameters);
651 void pushNodeByPathToFrontend(long requestId, RefPtr<JSON::Object>&& parameters);
652 void resolveNode(long requestId, RefPtr<JSON::Object>&& parameters);
653 void getAttributes(long requestId, RefPtr<JSON::Object>&& parameters);
654 void moveTo(long requestId, RefPtr<JSON::Object>&& parameters);
655 void undo(long requestId, RefPtr<JSON::Object>&& parameters);
656 void redo(long requestId, RefPtr<JSON::Object>&& parameters);
657 void markUndoableState(long requestId, RefPtr<JSON::Object>&& parameters);
658 void focus(long requestId, RefPtr<JSON::Object>&& parameters);
659 void setInspectedNode(long requestId, RefPtr<JSON::Object>&& parameters);
660#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
661public:
662 void setAlternateDispatcher(AlternateDOMBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
663private:
664 AlternateDOMBackendDispatcher* m_alternateDispatcher { nullptr };
665#endif
666private:
667 DOMBackendDispatcher(BackendDispatcher&, DOMBackendDispatcherHandler*);
668 DOMBackendDispatcherHandler* m_agent { nullptr };
669};
670
671class JS_EXPORT_PRIVATE DOMDebuggerBackendDispatcher final : public SupplementalBackendDispatcher {
672public:
673 static Ref<DOMDebuggerBackendDispatcher> create(BackendDispatcher&, DOMDebuggerBackendDispatcherHandler*);
674 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
675private:
676 void setDOMBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
677 void removeDOMBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
678 void setEventBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
679 void removeEventBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
680 void setURLBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
681 void removeURLBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
682#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
683public:
684 void setAlternateDispatcher(AlternateDOMDebuggerBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
685private:
686 AlternateDOMDebuggerBackendDispatcher* m_alternateDispatcher { nullptr };
687#endif
688private:
689 DOMDebuggerBackendDispatcher(BackendDispatcher&, DOMDebuggerBackendDispatcherHandler*);
690 DOMDebuggerBackendDispatcherHandler* m_agent { nullptr };
691};
692
693class JS_EXPORT_PRIVATE DOMStorageBackendDispatcher final : public SupplementalBackendDispatcher {
694public:
695 static Ref<DOMStorageBackendDispatcher> create(BackendDispatcher&, DOMStorageBackendDispatcherHandler*);
696 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
697private:
698 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
699 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
700 void getDOMStorageItems(long requestId, RefPtr<JSON::Object>&& parameters);
701 void setDOMStorageItem(long requestId, RefPtr<JSON::Object>&& parameters);
702 void removeDOMStorageItem(long requestId, RefPtr<JSON::Object>&& parameters);
703#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
704public:
705 void setAlternateDispatcher(AlternateDOMStorageBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
706private:
707 AlternateDOMStorageBackendDispatcher* m_alternateDispatcher { nullptr };
708#endif
709private:
710 DOMStorageBackendDispatcher(BackendDispatcher&, DOMStorageBackendDispatcherHandler*);
711 DOMStorageBackendDispatcherHandler* m_agent { nullptr };
712};
713
714class JS_EXPORT_PRIVATE DatabaseBackendDispatcher final : public SupplementalBackendDispatcher {
715public:
716 static Ref<DatabaseBackendDispatcher> create(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
717 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
718private:
719 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
720 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
721 void getDatabaseTableNames(long requestId, RefPtr<JSON::Object>&& parameters);
722 void executeSQL(long requestId, RefPtr<JSON::Object>&& parameters);
723#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
724public:
725 void setAlternateDispatcher(AlternateDatabaseBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
726private:
727 AlternateDatabaseBackendDispatcher* m_alternateDispatcher { nullptr };
728#endif
729private:
730 DatabaseBackendDispatcher(BackendDispatcher&, DatabaseBackendDispatcherHandler*);
731 DatabaseBackendDispatcherHandler* m_agent { nullptr };
732};
733
734class JS_EXPORT_PRIVATE DebuggerBackendDispatcher final : public SupplementalBackendDispatcher {
735public:
736 static Ref<DebuggerBackendDispatcher> create(BackendDispatcher&, DebuggerBackendDispatcherHandler*);
737 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
738private:
739 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
740 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
741 void setAsyncStackTraceDepth(long requestId, RefPtr<JSON::Object>&& parameters);
742 void setBreakpointsActive(long requestId, RefPtr<JSON::Object>&& parameters);
743 void setBreakpointByUrl(long requestId, RefPtr<JSON::Object>&& parameters);
744 void setBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
745 void removeBreakpoint(long requestId, RefPtr<JSON::Object>&& parameters);
746 void continueUntilNextRunLoop(long requestId, RefPtr<JSON::Object>&& parameters);
747 void continueToLocation(long requestId, RefPtr<JSON::Object>&& parameters);
748 void stepOver(long requestId, RefPtr<JSON::Object>&& parameters);
749 void stepInto(long requestId, RefPtr<JSON::Object>&& parameters);
750 void stepOut(long requestId, RefPtr<JSON::Object>&& parameters);
751 void pause(long requestId, RefPtr<JSON::Object>&& parameters);
752 void resume(long requestId, RefPtr<JSON::Object>&& parameters);
753 void searchInContent(long requestId, RefPtr<JSON::Object>&& parameters);
754 void getScriptSource(long requestId, RefPtr<JSON::Object>&& parameters);
755 void getFunctionDetails(long requestId, RefPtr<JSON::Object>&& parameters);
756 void setPauseOnExceptions(long requestId, RefPtr<JSON::Object>&& parameters);
757 void setPauseOnAssertions(long requestId, RefPtr<JSON::Object>&& parameters);
758 void setPauseForInternalScripts(long requestId, RefPtr<JSON::Object>&& parameters);
759 void evaluateOnCallFrame(long requestId, RefPtr<JSON::Object>&& parameters);
760#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
761public:
762 void setAlternateDispatcher(AlternateDebuggerBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
763private:
764 AlternateDebuggerBackendDispatcher* m_alternateDispatcher { nullptr };
765#endif
766private:
767 DebuggerBackendDispatcher(BackendDispatcher&, DebuggerBackendDispatcherHandler*);
768 DebuggerBackendDispatcherHandler* m_agent { nullptr };
769};
770
771class JS_EXPORT_PRIVATE HeapBackendDispatcher final : public SupplementalBackendDispatcher {
772public:
773 static Ref<HeapBackendDispatcher> create(BackendDispatcher&, HeapBackendDispatcherHandler*);
774 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
775private:
776 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
777 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
778 void gc(long requestId, RefPtr<JSON::Object>&& parameters);
779 void snapshot(long requestId, RefPtr<JSON::Object>&& parameters);
780 void startTracking(long requestId, RefPtr<JSON::Object>&& parameters);
781 void stopTracking(long requestId, RefPtr<JSON::Object>&& parameters);
782 void getPreview(long requestId, RefPtr<JSON::Object>&& parameters);
783 void getRemoteObject(long requestId, RefPtr<JSON::Object>&& parameters);
784#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
785public:
786 void setAlternateDispatcher(AlternateHeapBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
787private:
788 AlternateHeapBackendDispatcher* m_alternateDispatcher { nullptr };
789#endif
790private:
791 HeapBackendDispatcher(BackendDispatcher&, HeapBackendDispatcherHandler*);
792 HeapBackendDispatcherHandler* m_agent { nullptr };
793};
794
795#if ENABLE(INDEXED_DATABASE)
796class JS_EXPORT_PRIVATE IndexedDBBackendDispatcher final : public SupplementalBackendDispatcher {
797public:
798 static Ref<IndexedDBBackendDispatcher> create(BackendDispatcher&, IndexedDBBackendDispatcherHandler*);
799 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
800private:
801 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
802 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
803 void requestDatabaseNames(long requestId, RefPtr<JSON::Object>&& parameters);
804 void requestDatabase(long requestId, RefPtr<JSON::Object>&& parameters);
805 void requestData(long requestId, RefPtr<JSON::Object>&& parameters);
806 void clearObjectStore(long requestId, RefPtr<JSON::Object>&& parameters);
807#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
808public:
809 void setAlternateDispatcher(AlternateIndexedDBBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
810private:
811 AlternateIndexedDBBackendDispatcher* m_alternateDispatcher { nullptr };
812#endif
813private:
814 IndexedDBBackendDispatcher(BackendDispatcher&, IndexedDBBackendDispatcherHandler*);
815 IndexedDBBackendDispatcherHandler* m_agent { nullptr };
816};
817#endif // ENABLE(INDEXED_DATABASE)
818
819class JS_EXPORT_PRIVATE InspectorBackendDispatcher final : public SupplementalBackendDispatcher {
820public:
821 static Ref<InspectorBackendDispatcher> create(BackendDispatcher&, InspectorBackendDispatcherHandler*);
822 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
823private:
824 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
825 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
826 void initialized(long requestId, RefPtr<JSON::Object>&& parameters);
827#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
828public:
829 void setAlternateDispatcher(AlternateInspectorBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
830private:
831 AlternateInspectorBackendDispatcher* m_alternateDispatcher { nullptr };
832#endif
833private:
834 InspectorBackendDispatcher(BackendDispatcher&, InspectorBackendDispatcherHandler*);
835 InspectorBackendDispatcherHandler* m_agent { nullptr };
836};
837
838class JS_EXPORT_PRIVATE LayerTreeBackendDispatcher final : public SupplementalBackendDispatcher {
839public:
840 static Ref<LayerTreeBackendDispatcher> create(BackendDispatcher&, LayerTreeBackendDispatcherHandler*);
841 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
842private:
843 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
844 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
845 void layersForNode(long requestId, RefPtr<JSON::Object>&& parameters);
846 void reasonsForCompositingLayer(long requestId, RefPtr<JSON::Object>&& parameters);
847#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
848public:
849 void setAlternateDispatcher(AlternateLayerTreeBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
850private:
851 AlternateLayerTreeBackendDispatcher* m_alternateDispatcher { nullptr };
852#endif
853private:
854 LayerTreeBackendDispatcher(BackendDispatcher&, LayerTreeBackendDispatcherHandler*);
855 LayerTreeBackendDispatcherHandler* m_agent { nullptr };
856};
857
858#if ENABLE(RESOURCE_USAGE)
859class JS_EXPORT_PRIVATE MemoryBackendDispatcher final : public SupplementalBackendDispatcher {
860public:
861 static Ref<MemoryBackendDispatcher> create(BackendDispatcher&, MemoryBackendDispatcherHandler*);
862 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
863private:
864 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
865 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
866 void startTracking(long requestId, RefPtr<JSON::Object>&& parameters);
867 void stopTracking(long requestId, RefPtr<JSON::Object>&& parameters);
868#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
869public:
870 void setAlternateDispatcher(AlternateMemoryBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
871private:
872 AlternateMemoryBackendDispatcher* m_alternateDispatcher { nullptr };
873#endif
874private:
875 MemoryBackendDispatcher(BackendDispatcher&, MemoryBackendDispatcherHandler*);
876 MemoryBackendDispatcherHandler* m_agent { nullptr };
877};
878#endif // ENABLE(RESOURCE_USAGE)
879
880class JS_EXPORT_PRIVATE NetworkBackendDispatcher final : public SupplementalBackendDispatcher {
881public:
882 static Ref<NetworkBackendDispatcher> create(BackendDispatcher&, NetworkBackendDispatcherHandler*);
883 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
884private:
885 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
886 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
887 void setExtraHTTPHeaders(long requestId, RefPtr<JSON::Object>&& parameters);
888 void getResponseBody(long requestId, RefPtr<JSON::Object>&& parameters);
889 void setResourceCachingDisabled(long requestId, RefPtr<JSON::Object>&& parameters);
890 void loadResource(long requestId, RefPtr<JSON::Object>&& parameters);
891 void getSerializedCertificate(long requestId, RefPtr<JSON::Object>&& parameters);
892 void resolveWebSocket(long requestId, RefPtr<JSON::Object>&& parameters);
893#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
894public:
895 void setAlternateDispatcher(AlternateNetworkBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
896private:
897 AlternateNetworkBackendDispatcher* m_alternateDispatcher { nullptr };
898#endif
899private:
900 NetworkBackendDispatcher(BackendDispatcher&, NetworkBackendDispatcherHandler*);
901 NetworkBackendDispatcherHandler* m_agent { nullptr };
902};
903
904class JS_EXPORT_PRIVATE PageBackendDispatcher final : public SupplementalBackendDispatcher {
905public:
906 static Ref<PageBackendDispatcher> create(BackendDispatcher&, PageBackendDispatcherHandler*);
907 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
908private:
909 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
910 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
911 void reload(long requestId, RefPtr<JSON::Object>&& parameters);
912 void navigate(long requestId, RefPtr<JSON::Object>&& parameters);
913 void overrideUserAgent(long requestId, RefPtr<JSON::Object>&& parameters);
914 void overrideSetting(long requestId, RefPtr<JSON::Object>&& parameters);
915 void getCookies(long requestId, RefPtr<JSON::Object>&& parameters);
916 void deleteCookie(long requestId, RefPtr<JSON::Object>&& parameters);
917 void getResourceTree(long requestId, RefPtr<JSON::Object>&& parameters);
918 void getResourceContent(long requestId, RefPtr<JSON::Object>&& parameters);
919 void searchInResource(long requestId, RefPtr<JSON::Object>&& parameters);
920 void searchInResources(long requestId, RefPtr<JSON::Object>&& parameters);
921 void setShowRulers(long requestId, RefPtr<JSON::Object>&& parameters);
922 void setShowPaintRects(long requestId, RefPtr<JSON::Object>&& parameters);
923 void setEmulatedMedia(long requestId, RefPtr<JSON::Object>&& parameters);
924 void setForcedAppearance(long requestId, RefPtr<JSON::Object>&& parameters);
925 void getCompositingBordersVisible(long requestId, RefPtr<JSON::Object>&& parameters);
926 void setCompositingBordersVisible(long requestId, RefPtr<JSON::Object>&& parameters);
927 void snapshotNode(long requestId, RefPtr<JSON::Object>&& parameters);
928 void snapshotRect(long requestId, RefPtr<JSON::Object>&& parameters);
929 void archive(long requestId, RefPtr<JSON::Object>&& parameters);
930#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
931public:
932 void setAlternateDispatcher(AlternatePageBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
933private:
934 AlternatePageBackendDispatcher* m_alternateDispatcher { nullptr };
935#endif
936private:
937 PageBackendDispatcher(BackendDispatcher&, PageBackendDispatcherHandler*);
938 PageBackendDispatcherHandler* m_agent { nullptr };
939};
940
941class JS_EXPORT_PRIVATE RuntimeBackendDispatcher final : public SupplementalBackendDispatcher {
942public:
943 static Ref<RuntimeBackendDispatcher> create(BackendDispatcher&, RuntimeBackendDispatcherHandler*);
944 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
945private:
946 void parse(long requestId, RefPtr<JSON::Object>&& parameters);
947 void evaluate(long requestId, RefPtr<JSON::Object>&& parameters);
948 void awaitPromise(long requestId, RefPtr<JSON::Object>&& parameters);
949 void callFunctionOn(long requestId, RefPtr<JSON::Object>&& parameters);
950 void getPreview(long requestId, RefPtr<JSON::Object>&& parameters);
951 void getProperties(long requestId, RefPtr<JSON::Object>&& parameters);
952 void getDisplayableProperties(long requestId, RefPtr<JSON::Object>&& parameters);
953 void getCollectionEntries(long requestId, RefPtr<JSON::Object>&& parameters);
954 void saveResult(long requestId, RefPtr<JSON::Object>&& parameters);
955 void releaseObject(long requestId, RefPtr<JSON::Object>&& parameters);
956 void releaseObjectGroup(long requestId, RefPtr<JSON::Object>&& parameters);
957 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
958 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
959 void getRuntimeTypesForVariablesAtOffsets(long requestId, RefPtr<JSON::Object>&& parameters);
960 void enableTypeProfiler(long requestId, RefPtr<JSON::Object>&& parameters);
961 void disableTypeProfiler(long requestId, RefPtr<JSON::Object>&& parameters);
962 void enableControlFlowProfiler(long requestId, RefPtr<JSON::Object>&& parameters);
963 void disableControlFlowProfiler(long requestId, RefPtr<JSON::Object>&& parameters);
964 void getBasicBlocks(long requestId, RefPtr<JSON::Object>&& parameters);
965#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
966public:
967 void setAlternateDispatcher(AlternateRuntimeBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
968private:
969 AlternateRuntimeBackendDispatcher* m_alternateDispatcher { nullptr };
970#endif
971private:
972 RuntimeBackendDispatcher(BackendDispatcher&, RuntimeBackendDispatcherHandler*);
973 RuntimeBackendDispatcherHandler* m_agent { nullptr };
974};
975
976class JS_EXPORT_PRIVATE ScriptProfilerBackendDispatcher final : public SupplementalBackendDispatcher {
977public:
978 static Ref<ScriptProfilerBackendDispatcher> create(BackendDispatcher&, ScriptProfilerBackendDispatcherHandler*);
979 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
980private:
981 void startTracking(long requestId, RefPtr<JSON::Object>&& parameters);
982 void stopTracking(long requestId, RefPtr<JSON::Object>&& parameters);
983#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
984public:
985 void setAlternateDispatcher(AlternateScriptProfilerBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
986private:
987 AlternateScriptProfilerBackendDispatcher* m_alternateDispatcher { nullptr };
988#endif
989private:
990 ScriptProfilerBackendDispatcher(BackendDispatcher&, ScriptProfilerBackendDispatcherHandler*);
991 ScriptProfilerBackendDispatcherHandler* m_agent { nullptr };
992};
993
994class JS_EXPORT_PRIVATE ServiceWorkerBackendDispatcher final : public SupplementalBackendDispatcher {
995public:
996 static Ref<ServiceWorkerBackendDispatcher> create(BackendDispatcher&, ServiceWorkerBackendDispatcherHandler*);
997 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
998private:
999 void getInitializationInfo(long requestId, RefPtr<JSON::Object>&& parameters);
1000#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
1001public:
1002 void setAlternateDispatcher(AlternateServiceWorkerBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
1003private:
1004 AlternateServiceWorkerBackendDispatcher* m_alternateDispatcher { nullptr };
1005#endif
1006private:
1007 ServiceWorkerBackendDispatcher(BackendDispatcher&, ServiceWorkerBackendDispatcherHandler*);
1008 ServiceWorkerBackendDispatcherHandler* m_agent { nullptr };
1009};
1010
1011class JS_EXPORT_PRIVATE TargetBackendDispatcher final : public SupplementalBackendDispatcher {
1012public:
1013 static Ref<TargetBackendDispatcher> create(BackendDispatcher&, TargetBackendDispatcherHandler*);
1014 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
1015private:
1016 void exists(long requestId, RefPtr<JSON::Object>&& parameters);
1017 void sendMessageToTarget(long requestId, RefPtr<JSON::Object>&& parameters);
1018#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
1019public:
1020 void setAlternateDispatcher(AlternateTargetBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
1021private:
1022 AlternateTargetBackendDispatcher* m_alternateDispatcher { nullptr };
1023#endif
1024private:
1025 TargetBackendDispatcher(BackendDispatcher&, TargetBackendDispatcherHandler*);
1026 TargetBackendDispatcherHandler* m_agent { nullptr };
1027};
1028
1029class JS_EXPORT_PRIVATE TimelineBackendDispatcher final : public SupplementalBackendDispatcher {
1030public:
1031 static Ref<TimelineBackendDispatcher> create(BackendDispatcher&, TimelineBackendDispatcherHandler*);
1032 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
1033private:
1034 void start(long requestId, RefPtr<JSON::Object>&& parameters);
1035 void stop(long requestId, RefPtr<JSON::Object>&& parameters);
1036 void setAutoCaptureEnabled(long requestId, RefPtr<JSON::Object>&& parameters);
1037 void setInstruments(long requestId, RefPtr<JSON::Object>&& parameters);
1038#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
1039public:
1040 void setAlternateDispatcher(AlternateTimelineBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
1041private:
1042 AlternateTimelineBackendDispatcher* m_alternateDispatcher { nullptr };
1043#endif
1044private:
1045 TimelineBackendDispatcher(BackendDispatcher&, TimelineBackendDispatcherHandler*);
1046 TimelineBackendDispatcherHandler* m_agent { nullptr };
1047};
1048
1049class JS_EXPORT_PRIVATE WorkerBackendDispatcher final : public SupplementalBackendDispatcher {
1050public:
1051 static Ref<WorkerBackendDispatcher> create(BackendDispatcher&, WorkerBackendDispatcherHandler*);
1052 void dispatch(long requestId, const String& method, Ref<JSON::Object>&& message) override;
1053private:
1054 void enable(long requestId, RefPtr<JSON::Object>&& parameters);
1055 void disable(long requestId, RefPtr<JSON::Object>&& parameters);
1056 void initialized(long requestId, RefPtr<JSON::Object>&& parameters);
1057 void sendMessageToWorker(long requestId, RefPtr<JSON::Object>&& parameters);
1058#if ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS)
1059public:
1060 void setAlternateDispatcher(AlternateWorkerBackendDispatcher* alternateDispatcher) { m_alternateDispatcher = alternateDispatcher; }
1061private:
1062 AlternateWorkerBackendDispatcher* m_alternateDispatcher { nullptr };
1063#endif
1064private:
1065 WorkerBackendDispatcher(BackendDispatcher&, WorkerBackendDispatcherHandler*);
1066 WorkerBackendDispatcherHandler* m_agent { nullptr };
1067};
1068
1069} // namespace Inspector
1070