OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 /* | 31 /* |
32 * CodeGeneratorInstrumentation.py uses this file as a source to generate | 32 * CodeGeneratorInstrumentation.py uses this file as a source to generate |
33 * InspectorInstrumentationInl.h and InspectorInstrumentationImpl.cpp | 33 * InspectorInstrumentationInl.h and InspectorInstrumentationImpl.cpp |
34 * | 34 * |
35 * The code below is not a correct IDL but a mix of IDL and C++. | 35 * The code below is not a correct IDL but a mix of IDL and C++. |
36 * | 36 * |
37 * The syntax for an instrumentation method is as follows: | 37 * The syntax for an instrumentation method is as follows: |
38 * | 38 * |
39 * [methodAttributes] returnValue methodName([paramAttributes] paramList) | 39 * [methodAttributes] returnValue methodName([paramAttr1] param1, [paramAttr2]
param2, ...) |
40 * | 40 * |
41 * Where: | 41 * Where: |
42 * methodAttributes - optional list of method attributes. | 42 * methodAttributes - optional list of method attributes. |
43 * Attributes containing "=" are code generation options: | 43 * Attributes containing "=" are code generation options: |
44 * Inline=Custom - do not generate the public inline method. | 44 * Inline=Custom - do not generate the public inline method. |
45 * Inline=FastReturn - return early from the inline method if there are
no frontends. | 45 * Inline=FastReturn - return early from the inline method if there are
no frontends. |
46 * Inline=Forward - generate a simple forwarding inline method that doe
s not | 46 * Inline=Forward - generate a simple forwarding inline method that doe
s not |
47 modify the parameter list (implies Inline=FastRetur
n) | 47 modify the parameter list (implies Inline=FastRetur
n) |
48 * Attributes without "=" are the names of the agents to be invoked. | 48 * Attributes without "=" are the names of the agents to be invoked. |
49 * Examples: DOM, Page, Debugger. | 49 * Examples: DOM, Page, Debugger. |
50 * | 50 * |
51 * paramAttributes - options list of attributes controlling the parameters hand
ling. | 51 * paramAttr - optional attribute controlling the parameters handling (one attr
ibute per parameter max). |
52 * Keep - pass first parameter (used to access the InstrumentingAgents inst
ance) to agents. | 52 * Keep - pass first parameter (used to access the InstrumentingAgents inst
ance) to agents. |
| 53 * FastReturn - return early from the inline method if this parameter is 0/
false. |
53 * | 54 * |
54 * returnValue: C++ return value. Only "void" and "InspectorInstrumentationCook
ie" are supported. | 55 * returnValue: C++ return value. Only "void" and "InspectorInstrumentationCook
ie" are supported. |
55 * | 56 * |
56 * methodName: C++ name for the public instrumentation method and agents method
s. | 57 * methodName: C++ name for the public instrumentation method and agents method
s. |
57 * | 58 * |
58 * paramList: C++ parameter list with optional names. Names will be deduced fro
m types if omitted but you have to | 59 * paramList: C++ parameter list with optional names. Names will be deduced fro
m types if omitted but you have to |
59 * specify explicit names for multiple parameters of the same type. | 60 * specify explicit names for multiple parameters of the same type. |
60 */ | 61 */ |
61 | 62 |
62 interface InspectorInstrumentation { | 63 interface InspectorInstrumentation { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 108 |
108 [CSS, Inline=FastReturn] | 109 [CSS, Inline=FastReturn] |
109 void willRemoveNamedFlow([Keep] Document*, NamedFlow*); | 110 void willRemoveNamedFlow([Keep] Document*, NamedFlow*); |
110 | 111 |
111 [CSS, Inline=FastReturn] | 112 [CSS, Inline=FastReturn] |
112 void didUpdateRegionLayout([Keep] Document*, NamedFlow*); | 113 void didUpdateRegionLayout([Keep] Document*, NamedFlow*); |
113 | 114 |
114 [DOMDebugger, Inline=FastReturn] | 115 [DOMDebugger, Inline=FastReturn] |
115 void willSendXMLHttpRequest(ScriptExecutionContext*, const String& url); | 116 void willSendXMLHttpRequest(ScriptExecutionContext*, const String& url); |
116 | 117 |
| 118 [DOMDebugger, Inline=FastReturn] |
| 119 void didFireWebGLError(Document*, const String& errorName); |
| 120 |
117 [Timeline, Inline=FastReturn] | 121 [Timeline, Inline=FastReturn] |
118 void didScheduleResourceRequest([Keep] Document*, const String& url); | 122 void didScheduleResourceRequest([Keep] Document*, const String& url); |
119 | 123 |
120 [DOMDebugger, Timeline, Inline=FastReturn] | 124 [DOMDebugger, Timeline, Inline=FastReturn] |
121 void didInstallTimer([Keep] ScriptExecutionContext*, int timerId, int timeou
t, bool singleShot); | 125 void didInstallTimer([Keep] ScriptExecutionContext*, int timerId, int timeou
t, bool singleShot); |
122 | 126 |
123 [DOMDebugger, Timeline, Inline=FastReturn] | 127 [DOMDebugger, Timeline, Inline=FastReturn] |
124 void didRemoveTimer([Keep] ScriptExecutionContext*, int timerId); | 128 void didRemoveTimer([Keep] ScriptExecutionContext*, int timerId); |
125 | 129 |
126 [Timeline, Inline=FastReturn] | 130 [Timeline, Inline=FastReturn] |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 219 |
216 [Timeline, Resource, Inline=FastReturn] | 220 [Timeline, Resource, Inline=FastReturn] |
217 void didScheduleStyleRecalculation([Keep] Document*); | 221 void didScheduleStyleRecalculation([Keep] Document*); |
218 | 222 |
219 [CSS, Inline=FastReturn] | 223 [CSS, Inline=FastReturn] |
220 InspectorInstrumentationCookie willMatchRule(Document*, StyleRule*, Inspecto
rCSSOMWrappers&, DocumentStyleSheetCollection*); | 224 InspectorInstrumentationCookie willMatchRule(Document*, StyleRule*, Inspecto
rCSSOMWrappers&, DocumentStyleSheetCollection*); |
221 | 225 |
222 [CSS, Inline=FastReturn] | 226 [CSS, Inline=FastReturn] |
223 void didMatchRule(const InspectorInstrumentationCookie&, bool matched); | 227 void didMatchRule(const InspectorInstrumentationCookie&, bool matched); |
224 | 228 |
225 [CSS, Inline=Custom] | 229 [CSS, Inline=FastReturn] |
226 InspectorInstrumentationCookie willProcessRule(Document* document, StyleRule
* rule, StyleResolver* styleResolver); | 230 InspectorInstrumentationCookie willProcessRule(Document* document, [FastRetu
rn] StyleRule* rule, StyleResolver* styleResolver); |
227 | 231 |
228 [CSS, Inline=FastReturn] | 232 [CSS, Inline=FastReturn] |
229 void didProcessRule(const InspectorInstrumentationCookie&); | 233 void didProcessRule(const InspectorInstrumentationCookie&); |
230 | 234 |
231 [Resource, Inline=FastReturn] | 235 [Resource, Inline=FastReturn] |
232 void applyUserAgentOverride(Frame*, String* userAgent); | 236 void applyUserAgentOverride(Frame*, String* userAgent); |
233 | 237 |
234 [Page, Inline=FastReturn] | 238 [Page, Inline=FastReturn] |
235 void applyScreenWidthOverride(Frame*, long* width); | 239 void applyScreenWidthOverride(Frame*, long* width); |
236 | 240 |
237 [Page, Inline=FastReturn] | 241 [Page, Inline=FastReturn] |
238 void applyScreenHeightOverride(Frame*, long* height); | 242 void applyScreenHeightOverride(Frame*, long* height); |
239 | 243 |
240 [Page, Inline=FastReturn] | 244 [Page, Inline=FastReturn] |
241 void applyEmulatedMedia(Frame*, String* media); | 245 void applyEmulatedMedia(Frame*, String* media); |
242 | 246 |
243 [Timeline, Resource] | 247 [Timeline, Resource] |
244 void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, Reso
urceRequest&, const ResourceResponse& redirectResponse); | 248 void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, Reso
urceRequest&, const ResourceResponse& redirectResponse, const CachedResourceInit
iatorInfo&); |
245 | 249 |
246 void continueAfterPingLoader(Frame*, unsigned long identifier, DocumentLoade
r*, ResourceRequest&, const ResourceResponse&); | 250 void continueAfterPingLoader(Frame*, unsigned long identifier, DocumentLoade
r*, ResourceRequest&, const ResourceResponse&); |
247 | 251 |
248 [Resource] | 252 [Resource] |
249 void markResourceAsCached(Page*, unsigned long identifier); | 253 void markResourceAsCached(Page*, unsigned long identifier); |
250 | 254 |
251 [Timeline, Inline=FastReturn] | 255 [Timeline, Inline=FastReturn] |
252 InspectorInstrumentationCookie willReceiveResourceData([Keep] Frame*, unsign
ed long identifier, int length); | 256 InspectorInstrumentationCookie willReceiveResourceData([Keep] Frame*, unsign
ed long identifier, int length); |
253 | 257 |
254 [Timeline, Inline=FastReturn] | 258 [Timeline, Inline=FastReturn] |
(...skipping 26 matching lines...) Expand all Loading... |
281 [Resource] | 285 [Resource] |
282 void documentThreadableLoaderStartedLoadingForClient(ScriptExecutionContext*
, unsigned long identifier, ThreadableLoaderClient* client); | 286 void documentThreadableLoaderStartedLoadingForClient(ScriptExecutionContext*
, unsigned long identifier, ThreadableLoaderClient* client); |
283 | 287 |
284 [Resource] | 288 [Resource] |
285 void willLoadXHR(ScriptExecutionContext*, ThreadableLoaderClient* client, co
nst String& method, const KURL& url, bool async, PassRefPtr<FormData>, const HTT
PHeaderMap& headers, bool includeCredentials); | 289 void willLoadXHR(ScriptExecutionContext*, ThreadableLoaderClient* client, co
nst String& method, const KURL& url, bool async, PassRefPtr<FormData>, const HTT
PHeaderMap& headers, bool includeCredentials); |
286 | 290 |
287 [Resource] | 291 [Resource] |
288 void didFailXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient* clie
nt); | 292 void didFailXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient* clie
nt); |
289 | 293 |
290 [Console, Resource] | 294 [Console, Resource] |
291 void didFinishXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient* cl
ient, unsigned long identifier, const String& sourceString, const String& url, c
onst String& sendURL, unsigned sendLineNumber); | 295 void didFinishXHRLoading(ScriptExecutionContext*, ThreadableLoaderClient* cl
ient, unsigned long identifier, ScriptString sourceString, const String& url, co
nst String& sendURL, unsigned sendLineNumber); |
292 | 296 |
293 [Resource] | 297 [Resource] |
294 void didReceiveXHRResponse(ScriptExecutionContext*, unsigned long identifier
); | 298 void didReceiveXHRResponse(ScriptExecutionContext*, unsigned long identifier
); |
295 | 299 |
296 [Resource] | 300 [Resource] |
297 void willLoadXHRSynchronously(ScriptExecutionContext*); | 301 void willLoadXHRSynchronously(ScriptExecutionContext*); |
298 | 302 |
299 [Resource] | 303 [Resource] |
300 void didLoadXHRSynchronously(ScriptExecutionContext*); | 304 void didLoadXHRSynchronously(ScriptExecutionContext*); |
301 | 305 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 362 |
359 [DOMDebugger, Timeline] | 363 [DOMDebugger, Timeline] |
360 void didCancelAnimationFrame([Keep] Document*, int callbackId); | 364 void didCancelAnimationFrame([Keep] Document*, int callbackId); |
361 | 365 |
362 [DOMDebugger, Timeline] | 366 [DOMDebugger, Timeline] |
363 InspectorInstrumentationCookie willFireAnimationFrame([Keep] Document*, int
callbackId); | 367 InspectorInstrumentationCookie willFireAnimationFrame([Keep] Document*, int
callbackId); |
364 | 368 |
365 [Timeline, Inline=FastReturn] | 369 [Timeline, Inline=FastReturn] |
366 void didFireAnimationFrame(const InspectorInstrumentationCookie&); | 370 void didFireAnimationFrame(const InspectorInstrumentationCookie&); |
367 | 371 |
368 [Console, Debugger, Inline=Custom] // FIXME: Drop this once we no longer ge
nerate stacks outside of Inspector. | |
369 void addMessageToConsole(Page* page, MessageSource source, MessageType type,
MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStac
k, unsigned long requestIdentifier = 0); | |
370 | |
371 [Console, Debugger, Inline=Custom] | |
372 void addMessageToConsole(Page* page, MessageSource source, MessageType type,
MessageLevel level, const String& message, ScriptState* state, PassRefPtr<Scrip
tArguments> arguments, unsigned long requestIdentifier = 0); | |
373 | |
374 [Console, Inline=Custom] | |
375 void addMessageToConsole(Page* page, MessageSource source, MessageType type,
MessageLevel level, const String& message, const String& scriptId, unsigned lin
eNumber, ScriptState* state = 0, unsigned long requestIdentifier = 0); | |
376 | |
377 [Console, Inline=Custom] | |
378 void consoleCount(Page* page, ScriptState* state, PassRefPtr<ScriptArguments
> arguments); | |
379 | |
380 [Timeline, Console, Inline=Custom] | |
381 void startConsoleTiming([Keep] Frame* frame, const String& title); | |
382 | |
383 [Console, Timeline, Inline=Custom] | |
384 void stopConsoleTiming([Keep] Frame* frame, const String& title, PassRefPtr<
ScriptCallStack> stack); | |
385 | |
386 [Timeline, Inline=Custom] | |
387 void consoleTimeStamp([Keep] Frame* frame, PassRefPtr<ScriptArguments> argum
ents); | |
388 | |
389 [Profiler, Inline=Custom] | |
390 void addStartProfilingMessageToConsole(Page* page, const String& title, unsi
gned lineNumber, const String& sourceURL); | |
391 | |
392 [Profiler, Inline=Custom] | |
393 void addProfile(Page* page, PassRefPtr<ScriptProfile> profile, PassRefPtr<Sc
riptCallStack> callStack); | |
394 | |
395 [Database, Inline=Custom] | |
396 void didOpenDatabase(ScriptExecutionContext* context, PassRefPtr<Database> d
atabase, const String& domain, const String& name, const String& version); | |
397 | |
398 [DOMStorage, Inline=FastReturn] | 372 [DOMStorage, Inline=FastReturn] |
399 void didDispatchDOMStorageEvent(Page* page, const String& key, const String&
oldValue, const String& newValue, StorageType storageType, SecurityOrigin* secu
rityOrigin); | 373 void didDispatchDOMStorageEvent(Page* page, const String& key, const String&
oldValue, const String& newValue, StorageType storageType, SecurityOrigin* secu
rityOrigin); |
400 | 374 |
401 [Worker] | 375 [Worker] |
402 void didStartWorkerContext(ScriptExecutionContext*, WorkerContextProxy* prox
y, const KURL& url); | 376 void didStartWorkerContext(ScriptExecutionContext*, WorkerContextProxy* prox
y, const KURL& url); |
403 | 377 |
404 [WorkerRuntime] | 378 [WorkerRuntime] |
405 void willEvaluateWorkerScript([Keep] WorkerContext* context, int workerThrea
dStartMode); | 379 void willEvaluateWorkerScript([Keep] WorkerContext* context, int workerThrea
dStartMode); |
406 | 380 |
407 [Worker] | 381 [Worker] |
(...skipping 28 matching lines...) Expand all Loading... |
436 | 410 |
437 [LayerTree] | 411 [LayerTree] |
438 void layerTreeDidChange(Page*); | 412 void layerTreeDidChange(Page*); |
439 | 413 |
440 [LayerTree] | 414 [LayerTree] |
441 void renderLayerDestroyed(Page*, const RenderLayer*); | 415 void renderLayerDestroyed(Page*, const RenderLayer*); |
442 | 416 |
443 [LayerTree] | 417 [LayerTree] |
444 void pseudoElementDestroyed(Page*, PseudoElement*); | 418 void pseudoElementDestroyed(Page*, PseudoElement*); |
445 } | 419 } |
| 420 |
| 421 interface InspectorConsoleInstrumentation { |
| 422 |
| 423 #include "core/inspector/ScriptArguments.h" |
| 424 #include "core/inspector/ScriptCallStack.h" |
| 425 #include "core/inspector/ScriptProfile.h" |
| 426 |
| 427 [Console, Debugger] // FIXME: Drop this once we no longer generate stacks o
utside of Inspector. |
| 428 void addMessageToConsole(Page* page, MessageSource source, MessageType type,
MessageLevel level, const String& message, PassRefPtr<ScriptCallStack> callStac
k, unsigned long requestIdentifier = 0); |
| 429 |
| 430 [Console, Debugger] |
| 431 void addMessageToConsole(Page* page, MessageSource source, MessageType type,
MessageLevel level, const String& message, ScriptState* state, PassRefPtr<Scrip
tArguments> arguments, unsigned long requestIdentifier = 0); |
| 432 |
| 433 [Console] |
| 434 void addMessageToConsole(Page* page, MessageSource source, MessageType type,
MessageLevel level, const String& message, const String& scriptId, unsigned lin
eNumber, ScriptState* state = 0, unsigned long requestIdentifier = 0); |
| 435 |
| 436 // FIXME: Convert to ScriptArguments to match non-worker context. |
| 437 // Use the same implementation as above as a similar method dispatched on Pa
ge. |
| 438 void addMessageToConsole(WorkerContext* workerContext, MessageSource source,
MessageType type, MessageLevel level, const String& message, PassRefPtr<ScriptC
allStack> callStack, unsigned long requestIdentifier = 0); |
| 439 |
| 440 // Use the same implementation as above as a similar method dispatched on Pa
ge. |
| 441 void addMessageToConsole(WorkerContext* workerContext, MessageSource source,
MessageType type, MessageLevel level, const String& message, const String& scri
ptId, unsigned lineNumber, ScriptState* state, unsigned long requestIdentifier =
0); |
| 442 |
| 443 [Console] |
| 444 void consoleCount(Page* page, ScriptState* state, PassRefPtr<ScriptArguments
> arguments); |
| 445 |
| 446 [Timeline, Console] |
| 447 void startConsoleTiming([Keep] Frame* frame, const String& title); |
| 448 |
| 449 [Console, Timeline] |
| 450 void stopConsoleTiming([Keep] Frame* frame, const String& title, PassRefPtr<
ScriptCallStack> stack); |
| 451 |
| 452 [Timeline, Inline=FastReturn] |
| 453 void consoleTimeStamp([Keep] Frame* frame, PassRefPtr<ScriptArguments> argum
ents); |
| 454 |
| 455 [Profiler] |
| 456 void addStartProfilingMessageToConsole(Page* page, const String& title, unsi
gned lineNumber, const String& sourceURL); |
| 457 |
| 458 [Profiler] |
| 459 void addProfile(Page* page, PassRefPtr<ScriptProfile> profile, PassRefPtr<Sc
riptCallStack> callStack); |
| 460 } |
| 461 |
| 462 interface InspectorDatabaseInstrumentation { |
| 463 |
| 464 #include "modules/webdatabase/Database.h" |
| 465 |
| 466 [Database] |
| 467 void didOpenDatabase(ScriptExecutionContext* context, PassRefPtr<Database> d
atabase, const String& domain, const String& name, const String& version); |
| 468 } |
| 469 |
| 470 interface InspectorOverrides { |
| 471 [CSS, Inline=FastReturn] |
| 472 bool forcePseudoState([Keep] Element* element, CSSSelector::PseudoType pseud
oState); |
| 473 |
| 474 [Page, Inline=FastReturn] |
| 475 bool shouldApplyScreenWidthOverride(Frame* frame); |
| 476 |
| 477 [Page, Inline=FastReturn] |
| 478 bool shouldApplyScreenHeightOverride(Frame* frame); |
| 479 |
| 480 [Worker, Inline=FastReturn] |
| 481 bool shouldPauseDedicatedWorkerOnStart(ScriptExecutionContext* context); |
| 482 |
| 483 [Page, Inline=FastReturn] |
| 484 GeolocationPosition* overrideGeolocationPosition(Page* page, [DefaultReturn]
GeolocationPosition* position); |
| 485 |
| 486 [Page, Inline=FastReturn] |
| 487 DeviceOrientationData* overrideDeviceOrientation(Page* page, [DefaultReturn]
DeviceOrientationData* deviceOrientation); |
| 488 |
| 489 [Profiler] |
| 490 String getCurrentUserInitiatedProfileName(Page* page, bool incrementProfileN
umber); |
| 491 } |
| 492 |
| 493 |
| 494 interface InspectorCanvasInstrumentation { |
| 495 |
| 496 #include "bindings/v8/ScriptObject.h" |
| 497 |
| 498 [Canvas] |
| 499 ScriptObject wrapCanvas2DRenderingContextForInstrumentation(Document*, const
ScriptObject&); |
| 500 |
| 501 [Canvas] |
| 502 ScriptObject wrapWebGLRenderingContextForInstrumentation(Document*, const Sc
riptObject&); |
| 503 } |
OLD | NEW |