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 "InspectorProtocolObjects.h" |
34 | #include <wtf/JSONValues.h> |
35 | #include <wtf/text/WTFString.h> |
36 | |
37 | namespace Inspector { |
38 | |
39 | class FrontendRouter; |
40 | |
41 | class JS_EXPORT_PRIVATE ApplicationCacheFrontendDispatcher { |
42 | WTF_MAKE_FAST_ALLOCATED; |
43 | public: |
44 | ApplicationCacheFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
45 | void applicationCacheStatusUpdated(const String& frameId, const String& manifestURL, int status); |
46 | void networkStateUpdated(bool isNowOnline); |
47 | private: |
48 | FrontendRouter& m_frontendRouter; |
49 | }; |
50 | |
51 | class JS_EXPORT_PRIVATE CSSFrontendDispatcher { |
52 | WTF_MAKE_FAST_ALLOCATED; |
53 | public: |
54 | CSSFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
55 | void mediaQueryResultChanged(); |
56 | void styleSheetChanged(const String& styleSheetId); |
57 | void (RefPtr<Inspector::Protocol::CSS::CSSStyleSheetHeader> ); |
58 | void styleSheetRemoved(const String& styleSheetId); |
59 | private: |
60 | FrontendRouter& m_frontendRouter; |
61 | }; |
62 | |
63 | class JS_EXPORT_PRIVATE CanvasFrontendDispatcher { |
64 | WTF_MAKE_FAST_ALLOCATED; |
65 | public: |
66 | CanvasFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
67 | void canvasAdded(RefPtr<Inspector::Protocol::Canvas::Canvas> canvas); |
68 | void canvasRemoved(const String& canvasId); |
69 | void canvasMemoryChanged(const String& canvasId, double memoryCost); |
70 | void extensionEnabled(const String& canvasId, const String& extension); |
71 | void cssCanvasClientNodesChanged(const String& canvasId); |
72 | // Named after parameter 'initiator' while generating command/event recordingStarted. |
73 | enum class Initiator { |
74 | Frontend = 148, |
75 | Console = 149, |
76 | AutoCapture = 150, |
77 | }; // enum class Initiator |
78 | void recordingStarted(const String& canvasId, Inspector::Protocol::Recording::Initiator initiator); |
79 | void recordingProgress(const String& canvasId, RefPtr<JSON::ArrayOf<Inspector::Protocol::Recording::Frame>> frames, int bufferUsed); |
80 | void recordingFinished(const String& canvasId, RefPtr<Inspector::Protocol::Recording::Recording> recording); |
81 | void programCreated(const String& canvasId, const String& programId); |
82 | void programDeleted(const String& programId); |
83 | private: |
84 | FrontendRouter& m_frontendRouter; |
85 | }; |
86 | |
87 | class JS_EXPORT_PRIVATE ConsoleFrontendDispatcher { |
88 | WTF_MAKE_FAST_ALLOCATED; |
89 | public: |
90 | ConsoleFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
91 | void messageAdded(RefPtr<Inspector::Protocol::Console::ConsoleMessage> message); |
92 | void messageRepeatCountUpdated(int count); |
93 | void messagesCleared(); |
94 | void heapSnapshot(double timestamp, const String& snapshotData, const String* title); |
95 | private: |
96 | FrontendRouter& m_frontendRouter; |
97 | }; |
98 | |
99 | class JS_EXPORT_PRIVATE DOMFrontendDispatcher { |
100 | WTF_MAKE_FAST_ALLOCATED; |
101 | public: |
102 | DOMFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
103 | void documentUpdated(); |
104 | void inspect(int nodeId); |
105 | void setChildNodes(int parentId, RefPtr<JSON::ArrayOf<Inspector::Protocol::DOM::Node>> nodes); |
106 | void attributeModified(int nodeId, const String& name, const String& value); |
107 | void attributeRemoved(int nodeId, const String& name); |
108 | void inlineStyleInvalidated(RefPtr<JSON::ArrayOf<int>> nodeIds); |
109 | void characterDataModified(int nodeId, const String& characterData); |
110 | void childNodeCountUpdated(int nodeId, int childNodeCount); |
111 | void childNodeInserted(int parentNodeId, int previousNodeId, RefPtr<Inspector::Protocol::DOM::Node> node); |
112 | void childNodeRemoved(int parentNodeId, int nodeId); |
113 | void shadowRootPushed(int hostId, RefPtr<Inspector::Protocol::DOM::Node> root); |
114 | void shadowRootPopped(int hostId, int rootId); |
115 | // Named after parameter 'customElementState' while generating command/event customElementStateChanged. |
116 | enum class CustomElementState { |
117 | Builtin = 69, |
118 | Custom = 70, |
119 | Waiting = 71, |
120 | Failed = 72, |
121 | }; // enum class CustomElementState |
122 | void customElementStateChanged(int nodeId, Inspector::Protocol::DOM::CustomElementState customElementState); |
123 | void pseudoElementAdded(int parentId, RefPtr<Inspector::Protocol::DOM::Node> pseudoElement); |
124 | void pseudoElementRemoved(int parentId, int pseudoElementId); |
125 | void didAddEventListener(int nodeId); |
126 | void willRemoveEventListener(int nodeId); |
127 | void didFireEvent(int nodeId, const String& eventName, double timestamp, RefPtr<JSON::Object> data); |
128 | void powerEfficientPlaybackStateChanged(int nodeId, double timestamp, bool isPowerEfficient); |
129 | private: |
130 | FrontendRouter& m_frontendRouter; |
131 | }; |
132 | |
133 | class JS_EXPORT_PRIVATE DOMStorageFrontendDispatcher { |
134 | WTF_MAKE_FAST_ALLOCATED; |
135 | public: |
136 | DOMStorageFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
137 | void domStorageItemsCleared(RefPtr<Inspector::Protocol::DOMStorage::StorageId> storageId); |
138 | void domStorageItemRemoved(RefPtr<Inspector::Protocol::DOMStorage::StorageId> storageId, const String& key); |
139 | void domStorageItemAdded(RefPtr<Inspector::Protocol::DOMStorage::StorageId> storageId, const String& key, const String& newValue); |
140 | void domStorageItemUpdated(RefPtr<Inspector::Protocol::DOMStorage::StorageId> storageId, const String& key, const String& oldValue, const String& newValue); |
141 | private: |
142 | FrontendRouter& m_frontendRouter; |
143 | }; |
144 | |
145 | class JS_EXPORT_PRIVATE DatabaseFrontendDispatcher { |
146 | WTF_MAKE_FAST_ALLOCATED; |
147 | public: |
148 | DatabaseFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
149 | void addDatabase(RefPtr<Inspector::Protocol::Database::Database> database); |
150 | private: |
151 | FrontendRouter& m_frontendRouter; |
152 | }; |
153 | |
154 | class JS_EXPORT_PRIVATE DebuggerFrontendDispatcher { |
155 | WTF_MAKE_FAST_ALLOCATED; |
156 | public: |
157 | DebuggerFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
158 | void globalObjectCleared(); |
159 | void scriptParsed(const String& scriptId, const String& url, int startLine, int startColumn, int endLine, int endColumn, const bool* isContentScript, const String* sourceURL, const String* sourceMapURL, const bool* module); |
160 | void scriptFailedToParse(const String& url, const String& scriptSource, int startLine, int errorLine, const String& errorMessage); |
161 | void breakpointResolved(const String& breakpointId, RefPtr<Inspector::Protocol::Debugger::Location> location); |
162 | // Named after parameter 'reason' while generating command/event paused. |
163 | enum class Reason { |
164 | XHR = 122, |
165 | Fetch = 123, |
166 | DOM = 201, |
167 | AnimationFrame = 202, |
168 | EventListener = 203, |
169 | Timer = 204, |
170 | Exception = 205, |
171 | Assert = 62, |
172 | CSPViolation = 206, |
173 | DebuggerStatement = 207, |
174 | Breakpoint = 208, |
175 | PauseOnNextStatement = 209, |
176 | Other = 45, |
177 | }; // enum class Reason |
178 | void paused(RefPtr<JSON::ArrayOf<Inspector::Protocol::Debugger::CallFrame>> callFrames, Reason reason, RefPtr<JSON::Object> data, RefPtr<Inspector::Protocol::Console::StackTrace> asyncStackTrace); |
179 | void resumed(); |
180 | void didSampleProbe(RefPtr<Inspector::Protocol::Debugger::ProbeSample> sample); |
181 | void playBreakpointActionSound(int breakpointActionId); |
182 | private: |
183 | FrontendRouter& m_frontendRouter; |
184 | }; |
185 | |
186 | class JS_EXPORT_PRIVATE HeapFrontendDispatcher { |
187 | WTF_MAKE_FAST_ALLOCATED; |
188 | public: |
189 | HeapFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
190 | void garbageCollected(RefPtr<Inspector::Protocol::Heap::GarbageCollection> collection); |
191 | void trackingStart(double timestamp, const String& snapshotData); |
192 | void trackingComplete(double timestamp, const String& snapshotData); |
193 | private: |
194 | FrontendRouter& m_frontendRouter; |
195 | }; |
196 | |
197 | class JS_EXPORT_PRIVATE InspectorFrontendDispatcher { |
198 | WTF_MAKE_FAST_ALLOCATED; |
199 | public: |
200 | InspectorFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
201 | void evaluateForTestInFrontend(const String& script); |
202 | void inspect(RefPtr<Inspector::Protocol::Runtime::RemoteObject> object, RefPtr<JSON::Object> hints); |
203 | void activateExtraDomains(RefPtr<JSON::ArrayOf<String>> domains); |
204 | private: |
205 | FrontendRouter& m_frontendRouter; |
206 | }; |
207 | |
208 | class JS_EXPORT_PRIVATE LayerTreeFrontendDispatcher { |
209 | WTF_MAKE_FAST_ALLOCATED; |
210 | public: |
211 | LayerTreeFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
212 | void layerTreeDidChange(); |
213 | private: |
214 | FrontendRouter& m_frontendRouter; |
215 | }; |
216 | |
217 | class JS_EXPORT_PRIVATE NetworkFrontendDispatcher { |
218 | WTF_MAKE_FAST_ALLOCATED; |
219 | public: |
220 | NetworkFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
221 | // Named after parameter 'type' while generating command/event requestWillBeSent. |
222 | enum class Type { |
223 | Document = 117, |
224 | Stylesheet = 118, |
225 | Image = 119, |
226 | Font = 120, |
227 | Script = 121, |
228 | XHR = 122, |
229 | Fetch = 123, |
230 | Ping = 124, |
231 | Beacon = 125, |
232 | WebSocket = 126, |
233 | Other = 127, |
234 | }; // enum class Type |
235 | void requestWillBeSent(const String& requestId, const String& frameId, const String& loaderId, const String& documentURL, RefPtr<Inspector::Protocol::Network::Request> request, double timestamp, double walltime, RefPtr<Inspector::Protocol::Network::Initiator> initiator, RefPtr<Inspector::Protocol::Network::Response> redirectResponse, Inspector::Protocol::Page::ResourceType* type, const String* targetId); |
236 | void responseReceived(const String& requestId, const String& frameId, const String& loaderId, double timestamp, Inspector::Protocol::Page::ResourceType type, RefPtr<Inspector::Protocol::Network::Response> response); |
237 | void dataReceived(const String& requestId, double timestamp, int dataLength, int encodedDataLength); |
238 | void loadingFinished(const String& requestId, double timestamp, const String* sourceMapURL, RefPtr<Inspector::Protocol::Network::Metrics> metrics); |
239 | void loadingFailed(const String& requestId, double timestamp, const String& errorText, const bool* canceled); |
240 | void requestServedFromMemoryCache(const String& requestId, const String& frameId, const String& loaderId, const String& documentURL, double timestamp, RefPtr<Inspector::Protocol::Network::Initiator> initiator, RefPtr<Inspector::Protocol::Network::CachedResource> resource); |
241 | void webSocketWillSendHandshakeRequest(const String& requestId, double timestamp, double walltime, RefPtr<Inspector::Protocol::Network::WebSocketRequest> request); |
242 | void webSocketHandshakeResponseReceived(const String& requestId, double timestamp, RefPtr<Inspector::Protocol::Network::WebSocketResponse> response); |
243 | void webSocketCreated(const String& requestId, const String& url); |
244 | void webSocketClosed(const String& requestId, double timestamp); |
245 | void webSocketFrameReceived(const String& requestId, double timestamp, RefPtr<Inspector::Protocol::Network::WebSocketFrame> response); |
246 | void webSocketFrameError(const String& requestId, double timestamp, const String& errorMessage); |
247 | void webSocketFrameSent(const String& requestId, double timestamp, RefPtr<Inspector::Protocol::Network::WebSocketFrame> response); |
248 | private: |
249 | FrontendRouter& m_frontendRouter; |
250 | }; |
251 | |
252 | class JS_EXPORT_PRIVATE PageFrontendDispatcher { |
253 | WTF_MAKE_FAST_ALLOCATED; |
254 | public: |
255 | PageFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
256 | void domContentEventFired(double timestamp); |
257 | void loadEventFired(double timestamp); |
258 | void frameNavigated(RefPtr<Inspector::Protocol::Page::Frame> frame); |
259 | void frameDetached(const String& frameId); |
260 | void frameStartedLoading(const String& frameId); |
261 | void frameStoppedLoading(const String& frameId); |
262 | void frameScheduledNavigation(const String& frameId, double delay); |
263 | void frameClearedScheduledNavigation(const String& frameId); |
264 | // Named after parameter 'appearance' while generating command/event defaultAppearanceDidChange. |
265 | enum class Appearance { |
266 | Light = 143, |
267 | Dark = 144, |
268 | }; // enum class Appearance |
269 | void defaultAppearanceDidChange(Inspector::Protocol::Page::Appearance appearance); |
270 | private: |
271 | FrontendRouter& m_frontendRouter; |
272 | }; |
273 | |
274 | class JS_EXPORT_PRIVATE RuntimeFrontendDispatcher { |
275 | WTF_MAKE_FAST_ALLOCATED; |
276 | public: |
277 | RuntimeFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
278 | void executionContextCreated(RefPtr<Inspector::Protocol::Runtime::ExecutionContextDescription> context); |
279 | private: |
280 | FrontendRouter& m_frontendRouter; |
281 | }; |
282 | |
283 | class JS_EXPORT_PRIVATE ScriptProfilerFrontendDispatcher { |
284 | WTF_MAKE_FAST_ALLOCATED; |
285 | public: |
286 | ScriptProfilerFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
287 | void trackingStart(double timestamp); |
288 | void trackingUpdate(RefPtr<Inspector::Protocol::ScriptProfiler::Event> event); |
289 | void trackingComplete(double timestamp, RefPtr<Inspector::Protocol::ScriptProfiler::Samples> samples); |
290 | private: |
291 | FrontendRouter& m_frontendRouter; |
292 | }; |
293 | |
294 | class JS_EXPORT_PRIVATE TargetFrontendDispatcher { |
295 | WTF_MAKE_FAST_ALLOCATED; |
296 | public: |
297 | TargetFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
298 | void targetCreated(RefPtr<Inspector::Protocol::Target::TargetInfo> targetInfo); |
299 | void targetDestroyed(const String& targetId); |
300 | void dispatchMessageFromTarget(const String& targetId, const String& message); |
301 | private: |
302 | FrontendRouter& m_frontendRouter; |
303 | }; |
304 | |
305 | class JS_EXPORT_PRIVATE TimelineFrontendDispatcher { |
306 | WTF_MAKE_FAST_ALLOCATED; |
307 | public: |
308 | TimelineFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
309 | void eventRecorded(RefPtr<Inspector::Protocol::Timeline::TimelineEvent> record); |
310 | void recordingStarted(double startTime); |
311 | void recordingStopped(double endTime); |
312 | void autoCaptureStarted(); |
313 | private: |
314 | FrontendRouter& m_frontendRouter; |
315 | }; |
316 | |
317 | class JS_EXPORT_PRIVATE WorkerFrontendDispatcher { |
318 | WTF_MAKE_FAST_ALLOCATED; |
319 | public: |
320 | WorkerFrontendDispatcher(FrontendRouter& frontendRouter) : m_frontendRouter(frontendRouter) { } |
321 | void workerCreated(const String& workerId, const String& url); |
322 | void workerTerminated(const String& workerId); |
323 | void dispatchMessageFromWorker(const String& workerId, const String& message); |
324 | private: |
325 | FrontendRouter& m_frontendRouter; |
326 | }; |
327 | |
328 | } // namespace Inspector |
329 | |