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