Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: third_party/WebKit/Source/core/inspector/InstrumentingProbes.idl

Issue 2760363002: [instrumentation] Generalize instrumentation to be used beyond the core layer (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the
13 * distribution.
14 * * Neither the name of Google Inc. nor the names of its
15 * contributors may be used to endorse or promote products derived from
16 * this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31 /*
32 * CodeGeneratorInstrumentation.py uses this file as a source to generate
33 * InspectorInstrumentationInl.h and InspectorInstrumentationImpl.cpp
34 *
35 * The code below is not a correct IDL but a mix of IDL and C++.
36 *
37 * The syntax for an instrumentation method is as follows:
38 *
39 * [methodAttributes] returnValue methodName([paramAttr1] param1, [paramAttr2] param2, ...)
40 *
41 * Where:
42 * methodAttributes - optional list of method attributes.
43 * Attributes without "=" are the names of the agents to be invoked.
44 * Examples: DOM, Page, Debugger.
45 *
46 * paramAttr - optional attribute controlling the parameters handling (one attr ibute per parameter max).
47 * Keep - pass first parameter (used to access the InstrumentingAgents inst ance) to agents.
48 *
49 * returnValue: C++ return value. Only "void" and "bool" are supported.
50 *
51 * methodName: C++ name for the public instrumentation method and agents method s.
52 *
53 * paramList: C++ parameter list with optional names. Names will be deduced fro m types if omitted but you have to
54 * specify explicit names for multiple parameters of the same type.
55 *
56 * Parameters with type PassRefPtr<T> are converted to raw pointers,
57 * so reference will not be passed or released until all agents are notified.
58 */
59
60 interface InspectorInstrumentation {
61
62 #include "core/animation/Animation.h"
63 #include "core/dom/CharacterData.h"
64 #include "core/dom/PseudoElement.h"
65 #include "core/html/HTMLSlotElement.h"
66
67 class ConsoleMessage;
68 class HTMLDocumentParser;
69 class ThreadableLoaderClient;
70 class WebSocketHandshakeRequest;
71 class WebSocketHandshakeResponse;
72 class WorkerInspectorProxy;
73 class XMLHttpRequest;
74
75 [Page, Animation]
76 void didClearDocumentOfWindowObject([Keep] LocalFrame*);
77
78 [DOMDebugger]
79 void willInsertDOMNode([Keep] Node* parent);
80
81 [DOM, DOMDebugger]
82 void didInsertDOMNode([Keep] Node*);
83
84 [DOMDebugger, DOM]
85 void willRemoveDOMNode([Keep] Node*);
86
87 [DOMDebugger, DOM]
88 void willModifyDOMAttr([Keep] Element*, const AtomicString& oldValue, const AtomicString& newValue);
89
90 [DOM]
91 void didModifyDOMAttr([Keep] Element*, const QualifiedName& name, const Atom icString& value);
92
93 [DOM]
94 void didRemoveDOMAttr([Keep] Element*, const QualifiedName& name);
95
96 [DOM]
97 void characterDataModified([Keep] CharacterData*);
98
99 [DOM, DOMDebugger]
100 void didInvalidateStyleAttr([Keep] Node*);
101
102 [DOM]
103 void didPerformElementShadowDistribution([Keep] Element*);
104
105 [DOM]
106 void didPerformSlotDistribution([Keep] HTMLSlotElement*);
107
108 [CSS]
109 void documentDetached([Keep] Document*);
110
111 [CSS]
112 void activeStyleSheetsUpdated([Keep] Document*);
113
114 [CSS]
115 void fontsUpdated(Document*);
116
117 [CSS]
118 void mediaQueryResultChanged(Document*);
119
120 [DOM]
121 void didPushShadowRoot([Keep] Element* host, ShadowRoot*);
122
123 [DOM]
124 void willPopShadowRoot([Keep] Element* host, ShadowRoot*);
125
126 [DOMDebugger]
127 void willSendXMLHttpOrFetchNetworkRequest(ExecutionContext*, const String& u rl);
128
129 [DOMDebugger]
130 void didCreateCanvasContext(Document*);
131
132 [DOMDebugger]
133 void didFireWebGLError(Element*, const String& errorName);
134
135 [DOMDebugger]
136 void didFireWebGLWarning(Element*);
137
138 [DOMDebugger]
139 void didFireWebGLErrorOrWarning(Element*, const String& message);
140
141 [Page]
142 void didResizeMainFrame(LocalFrame*);
143
144 [LayerTree]
145 void didPaint(LocalFrame*, const GraphicsLayer*, GraphicsContext&, const Lay outRect&);
146
147 [Network]
148 void applyUserAgentOverride(LocalFrame*, String* userAgent);
149
150 [Network]
151 void didBlockRequest([Keep] LocalFrame*, const ResourceRequest&, DocumentLoa der*, const FetchInitiatorInfo&, ResourceRequestBlockedReason);
152
153 [Network]
154 void didChangeResourcePriority(LocalFrame*, unsigned long identifier, Resour ceLoadPriority loadPriority);
155
156 [Network, TraceEvents]
157 void willSendRequest([Keep] LocalFrame*, unsigned long identifier, DocumentL oader*, ResourceRequest&, const ResourceResponse& redirectResponse, const FetchI nitiatorInfo&);
158
159 [Network]
160 void markResourceAsCached(LocalFrame*, unsigned long identifier);
161
162 [Network, TraceEvents]
163 void didReceiveResourceResponse([Keep] LocalFrame*, unsigned long identifier , DocumentLoader*, const ResourceResponse&, Resource*);
164
165 [Network, TraceEvents]
166 void didReceiveData([Keep] LocalFrame*, unsigned long identifier, const char * data, int dataLength);
167
168 [Network]
169 void didReceiveEncodedDataLength([Keep] LocalFrame*, unsigned long identifie r, int encodedDataLength);
170
171 [Network, TraceEvents]
172 void didFinishLoading([Keep] LocalFrame* frame, unsigned long identifier, do uble finishTime, int64_t encodedDataLength, int64_t decodedBodyLength);
173
174 [Network]
175 void didReceiveCORSRedirectResponse([Keep] LocalFrame*, unsigned long identi fier, DocumentLoader*, const ResourceResponse&, Resource*);
176
177 [Network, TraceEvents]
178 void didFailLoading(LocalFrame* frame, unsigned long identifier, const Resou rceError&);
179
180 [Network]
181 void documentThreadableLoaderStartedLoadingForClient(ExecutionContext*, unsi gned long identifier, ThreadableLoaderClient* client);
182
183 [Network]
184 void documentThreadableLoaderFailedToStartLoadingForClient(ExecutionContext* , ThreadableLoaderClient* client);
185
186 [Network]
187 void willSendEventSourceRequest(ExecutionContext*, ThreadableLoaderClient* e ventSource);
188
189 [Network]
190 void willDispatchEventSourceEvent(ExecutionContext*, ThreadableLoaderClient* eventSource, const AtomicString& eventName, const AtomicString& eventId, const String& data);
191
192 [Network]
193 void didFinishEventSourceRequest(ExecutionContext*, ThreadableLoaderClient* eventSource);
194
195 [Network]
196 void willLoadXHR(ExecutionContext*, XMLHttpRequest* xhr, ThreadableLoaderCli ent* client, const AtomicString& method, const KURL& url, bool async, PassRefPtr <EncodedFormData>, const HTTPHeaderMap& headers, bool includeCredentials);
197
198 [Network]
199 void didFailXHRLoading([Keep] ExecutionContext*, XMLHttpRequest* xhr, Thread ableLoaderClient* client, const AtomicString& method, const String& url);
200
201 [Network]
202 void didFinishXHRLoading([Keep] ExecutionContext*, XMLHttpRequest* xhr, Thre adableLoaderClient* client, const AtomicString& method, const String& url);
203
204 [Network]
205 void willStartFetch(ExecutionContext*, ThreadableLoaderClient*);
206
207 [Network]
208 void didFailFetch(ExecutionContext*, ThreadableLoaderClient*);
209
210 [Network]
211 void didFinishFetch([Keep] ExecutionContext*, ThreadableLoaderClient*, const AtomicString& method, const String& url);
212
213 // Detach and remove all references to the given client.
214 [Network]
215 void detachClientRequest(ExecutionContext*, ThreadableLoaderClient*);
216
217 [Network]
218 void scriptImported(ExecutionContext*, unsigned long identifier, const Strin g& sourceString);
219
220 [DOMDebugger]
221 void scriptExecutionBlockedByCSP(ExecutionContext*, const String& directiveT ext);
222
223 [Network]
224 void didReceiveScriptResponse(ExecutionContext*, unsigned long identifier);
225
226 [DOM, Page]
227 void domContentLoadedEventFired([Keep] LocalFrame*);
228
229 [Page]
230 void loadEventFired([Keep] LocalFrame*);
231
232 [Page]
233 void frameAttachedToParent([Keep] LocalFrame*);
234
235 [Page]
236 void frameDetachedFromParent([Keep] LocalFrame*);
237
238 [Network, DOM, Page]
239 void didCommitLoad([Keep] LocalFrame*, DocumentLoader*);
240
241 [DOM]
242 void frameDocumentUpdated([Keep] LocalFrame*);
243
244 [Page, Tracing]
245 void frameStartedLoading([Keep] LocalFrame*, FrameLoadType);
246
247 [Page, Tracing]
248 void frameStoppedLoading([Keep] LocalFrame*);
249
250 [Page, Network]
251 void frameScheduledNavigation([Keep] LocalFrame*, double delay);
252
253 [Page, Network]
254 void frameClearedScheduledNavigation([Keep] LocalFrame*);
255
256 [Network]
257 void frameScheduledClientNavigation([Keep] LocalFrame*);
258
259 [Network]
260 void frameClearedScheduledClientNavigation([Keep] LocalFrame*);
261
262 [Worker]
263 void didStartWorker(ExecutionContext*, WorkerInspectorProxy* proxy, bool wai tingForDebugger);
264
265 [Worker]
266 void workerTerminated(ExecutionContext*, WorkerInspectorProxy* proxy);
267
268 [Network]
269 void didCreateWebSocket([Keep] Document*, unsigned long identifier, const KU RL& requestURL, const String& protocol);
270
271 [Network]
272 void willSendWebSocketHandshakeRequest([Keep] Document*, unsigned long ident ifier, const WebSocketHandshakeRequest* request);
273
274 [Network]
275 void didReceiveWebSocketHandshakeResponse([Keep] Document*, unsigned long id entifier, const WebSocketHandshakeRequest* request, const WebSocketHandshakeResp onse* response);
276
277 [Network]
278 void didCloseWebSocket([Keep] Document*, unsigned long identifier);
279
280 [Network]
281 void didReceiveWebSocketFrame(Document*, unsigned long identifier, int opCod e, bool masked, const char* payload, size_t payloadLength);
282
283 [Network]
284 void didSendWebSocketFrame(Document*, unsigned long identifier, int opCode, bool masked, const char* payload, size_t payloadLength);
285
286 [Network]
287 void didReceiveWebSocketFrameError(Document*, unsigned long identifier, cons t String& errorMessage);
288
289 [ApplicationCache]
290 void networkStateChanged([Keep] LocalFrame*, bool online);
291
292 [ApplicationCache]
293 void updateApplicationCacheStatus([Keep] LocalFrame*);
294
295 [LayerTree]
296 void layerTreeDidChange(LocalFrame*);
297
298 [DOM]
299 void pseudoElementCreated([Keep] PseudoElement*);
300
301 [DOM]
302 void pseudoElementDestroyed([Keep] PseudoElement*);
303
304 [Animation]
305 void didCreateAnimation(Document*, unsigned);
306
307 [Animation]
308 void animationPlayStateChanged(Document*, Animation*, Animation::AnimationPl ayState oldPlayState, Animation::AnimationPlayState newPlayState);
309
310 [Page]
311 void windowCreated(LocalFrame* opener, LocalFrame* created);
312
313 [Log]
314 void consoleMessageAdded(ExecutionContext*, ConsoleMessage*);
315
316 [Page]
317 void willRunJavaScriptDialog(LocalFrame* frame, const String& message, Chrom eClient::DialogType dialogType);
318
319 [Page]
320 void didRunJavaScriptDialog(LocalFrame* frame, bool result);
321
322 [Performance]
323 void documentWriteFetchScript([Keep] Document*);
324
325 [Page]
326 void didChangeViewport(LocalFrame* document);
327
328 [DOMDebugger]
329 void breakableLocation(ExecutionContext* context, const char* name);
330
331 [Page, Performance]
332 RecalculateStyle(Document* document);
333
334 [Page, Performance]
335 UpdateLayout(Document*);
336
337 [Performance, DOMDebugger]
338 ExecuteScript([Keep] ExecutionContext* context);
339
340 [Performance, TraceEvents]
341 CallFunction([Keep] ExecutionContext* context, v8::Local<v8::Function> funct ion, int depth = 0);
342
343 [Performance, DOMDebugger]
344 UserCallback([Keep] ExecutionContext* context, const char* name, const Atomi cString& atomicName, bool recurring, EventTarget* eventTarget = nullptr);
345
346 [TraceEvents]
347 ParseHTML(Document* document, HTMLDocumentParser* parser);
348 }
349
350 interface InspectorOverrides {
351 [CSS]
352 bool forcePseudoState([Keep] Element* element, CSSSelector::PseudoType pseud oState);
353
354 [Worker]
355 bool shouldWaitForDebuggerOnWorkerStart(ExecutionContext* context);
356
357 [Network]
358 bool shouldForceCORSPreflight(Document*);
359
360 [Network]
361 bool shouldBlockRequest(LocalFrame*, const ResourceRequest&);
362 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698