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