OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/inspector/InspectorDOMDebuggerAgent.h" | 32 #include "core/inspector/InspectorDOMDebuggerAgent.h" |
33 | 33 |
34 #include "InspectorFrontend.h" | 34 #include "InspectorFrontend.h" |
35 #include "core/events/Event.h" | |
36 #include "core/inspector/InspectorDOMAgent.h" | 35 #include "core/inspector/InspectorDOMAgent.h" |
37 #include "core/inspector/InspectorState.h" | 36 #include "core/inspector/InspectorState.h" |
38 #include "core/inspector/InstrumentingAgents.h" | 37 #include "core/inspector/InstrumentingAgents.h" |
39 #include "platform/JSONValues.h" | 38 #include "platform/JSONValues.h" |
40 | 39 |
41 namespace { | 40 namespace { |
42 | 41 |
43 enum DOMBreakpointType { | 42 enum DOMBreakpointType { |
44 SubtreeModified = 0, | 43 SubtreeModified = 0, |
45 AttributeModified, | 44 AttributeModified, |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 RefPtr<JSONObject> eventListenerBreakpoints = m_state->getObject(DOMDebu
ggerAgentState::eventListenerBreakpoints); | 397 RefPtr<JSONObject> eventListenerBreakpoints = m_state->getObject(DOMDebu
ggerAgentState::eventListenerBreakpoints); |
399 if (eventListenerBreakpoints->find(fullEventName) == eventListenerBreakp
oints->end()) | 398 if (eventListenerBreakpoints->find(fullEventName) == eventListenerBreakp
oints->end()) |
400 return 0; | 399 return 0; |
401 } | 400 } |
402 | 401 |
403 RefPtr<JSONObject> eventData = JSONObject::create(); | 402 RefPtr<JSONObject> eventData = JSONObject::create(); |
404 eventData->setString("eventName", fullEventName); | 403 eventData->setString("eventName", fullEventName); |
405 return eventData.release(); | 404 return eventData.release(); |
406 } | 405 } |
407 | 406 |
408 void InspectorDOMDebuggerAgent::didInstallTimer(ExecutionContext* context, int t
imerId, int timeout, bool singleShot) | 407 void InspectorDOMDebuggerAgent::didInstallTimer(ExecutionContext*, int, int, boo
l) |
409 { | 408 { |
410 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, setTimerEven
tName), true); | 409 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, setTimerEven
tName), true); |
411 } | 410 } |
412 | 411 |
413 void InspectorDOMDebuggerAgent::didRemoveTimer(ExecutionContext* context, int ti
merId) | 412 void InspectorDOMDebuggerAgent::didRemoveTimer(ExecutionContext*, int) |
414 { | 413 { |
415 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, clearTimerEv
entName), true); | 414 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, clearTimerEv
entName), true); |
416 } | 415 } |
417 | 416 |
418 void InspectorDOMDebuggerAgent::willFireTimer(ExecutionContext* context, int tim
erId) | 417 void InspectorDOMDebuggerAgent::willFireTimer(ExecutionContext*, int) |
419 { | 418 { |
420 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, timerFiredEv
entName), false); | 419 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, timerFiredEv
entName), false); |
421 } | 420 } |
422 | 421 |
423 void InspectorDOMDebuggerAgent::didRequestAnimationFrame(Document* document, int
callbackId) | 422 void InspectorDOMDebuggerAgent::didRequestAnimationFrame(Document*, int) |
424 { | 423 { |
425 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, requestAnima
tionFrameEventName), true); | 424 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, requestAnima
tionFrameEventName), true); |
426 } | 425 } |
427 | 426 |
428 void InspectorDOMDebuggerAgent::didCancelAnimationFrame(Document* document, int
callbackId) | 427 void InspectorDOMDebuggerAgent::didCancelAnimationFrame(Document*, int) |
429 { | 428 { |
430 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, cancelAnimat
ionFrameEventName), true); | 429 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, cancelAnimat
ionFrameEventName), true); |
431 } | 430 } |
432 | 431 |
433 void InspectorDOMDebuggerAgent::willFireAnimationFrame(Document* document, int c
allbackId) | 432 void InspectorDOMDebuggerAgent::willFireAnimationFrame(Document*, int) |
434 { | 433 { |
435 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, animationFra
meFiredEventName), false); | 434 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(false, animationFra
meFiredEventName), false); |
436 } | 435 } |
437 | 436 |
438 void InspectorDOMDebuggerAgent::willHandleEvent(Event* event) | 437 void InspectorDOMDebuggerAgent::willHandleEvent(EventTarget*, const AtomicString
& eventType, EventListener*, bool) |
439 { | 438 { |
440 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(true, event->type()
), false); | 439 pauseOnNativeEventIfNeeded(preparePauseOnNativeEventData(true, eventType), f
alse); |
441 } | 440 } |
442 | 441 |
443 void InspectorDOMDebuggerAgent::didFireWebGLError(const String& errorName) | 442 void InspectorDOMDebuggerAgent::didFireWebGLError(const String& errorName) |
444 { | 443 { |
445 RefPtr<JSONObject> eventData = preparePauseOnNativeEventData(false, webglErr
orFiredEventName); | 444 RefPtr<JSONObject> eventData = preparePauseOnNativeEventData(false, webglErr
orFiredEventName); |
446 if (!eventData) | 445 if (!eventData) |
447 return; | 446 return; |
448 if (!errorName.isEmpty()) | 447 if (!errorName.isEmpty()) |
449 eventData->setString(webglErrorNameProperty, errorName); | 448 eventData->setString(webglErrorNameProperty, errorName); |
450 pauseOnNativeEventIfNeeded(eventData.release(), m_debuggerAgent->canBreakPro
gram()); | 449 pauseOnNativeEventIfNeeded(eventData.release(), m_debuggerAgent->canBreakPro
gram()); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 } | 511 } |
513 | 512 |
514 void InspectorDOMDebuggerAgent::clear() | 513 void InspectorDOMDebuggerAgent::clear() |
515 { | 514 { |
516 m_domBreakpoints.clear(); | 515 m_domBreakpoints.clear(); |
517 m_pauseInNextEventListener = false; | 516 m_pauseInNextEventListener = false; |
518 } | 517 } |
519 | 518 |
520 } // namespace WebCore | 519 } // namespace WebCore |
521 | 520 |
OLD | NEW |