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