| 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 26 matching lines...) Expand all Loading... |
| 37 #include <wtf/HashMap.h> | 37 #include <wtf/HashMap.h> |
| 38 #include <wtf/PassOwnPtr.h> | 38 #include <wtf/PassOwnPtr.h> |
| 39 #include <wtf/RefCounted.h> | 39 #include <wtf/RefCounted.h> |
| 40 #include <wtf/text/WTFString.h> | 40 #include <wtf/text/WTFString.h> |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace WebCore { |
| 43 | 43 |
| 44 class Document; | 44 class Document; |
| 45 class Element; | 45 class Element; |
| 46 class Event; | 46 class Event; |
| 47 class InspectorAgent; | |
| 48 class InspectorDOMAgent; | 47 class InspectorDOMAgent; |
| 49 class InspectorDebuggerAgent; | 48 class InspectorDebuggerAgent; |
| 50 class InspectorFrontend; | 49 class InspectorFrontend; |
| 51 class InspectorObject; | 50 class InspectorObject; |
| 52 class InspectorState; | 51 class InspectorState; |
| 53 class InstrumentingAgents; | 52 class InstrumentingAgents; |
| 54 class Node; | 53 class Node; |
| 55 | 54 |
| 56 typedef String ErrorString; | 55 typedef String ErrorString; |
| 57 | 56 |
| 58 class InspectorDOMDebuggerAgent : public InspectorBaseAgent<InspectorDOMDebugger
Agent>, public InspectorDebuggerAgent::Listener, public InspectorBackendDispatch
er::DOMDebuggerCommandHandler { | 57 class InspectorDOMDebuggerAgent : public InspectorBaseAgent<InspectorDOMDebugger
Agent>, public InspectorDebuggerAgent::Listener, public InspectorBackendDispatch
er::DOMDebuggerCommandHandler { |
| 59 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent); | 58 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent); |
| 60 public: | 59 public: |
| 61 static PassOwnPtr<InspectorDOMDebuggerAgent> create(InstrumentingAgents*, In
spectorCompositeState*, InspectorDOMAgent*, InspectorDebuggerAgent*, InspectorAg
ent*); | 60 static PassOwnPtr<InspectorDOMDebuggerAgent> create(InstrumentingAgents*, In
spectorCompositeState*, InspectorDOMAgent*, InspectorDebuggerAgent*); |
| 62 | 61 |
| 63 virtual ~InspectorDOMDebuggerAgent(); | 62 virtual ~InspectorDOMDebuggerAgent(); |
| 64 | 63 |
| 65 // DOMDebugger API for InspectorFrontend | 64 // DOMDebugger API for InspectorFrontend |
| 66 virtual void setXHRBreakpoint(ErrorString*, const String& url); | 65 virtual void setXHRBreakpoint(ErrorString*, const String& url); |
| 67 virtual void removeXHRBreakpoint(ErrorString*, const String& url); | 66 virtual void removeXHRBreakpoint(ErrorString*, const String& url); |
| 68 virtual void setEventListenerBreakpoint(ErrorString*, const String& eventNam
e); | 67 virtual void setEventListenerBreakpoint(ErrorString*, const String& eventNam
e); |
| 69 virtual void removeEventListenerBreakpoint(ErrorString*, const String& event
Name); | 68 virtual void removeEventListenerBreakpoint(ErrorString*, const String& event
Name); |
| 70 virtual void setInstrumentationBreakpoint(ErrorString*, const String& eventN
ame); | 69 virtual void setInstrumentationBreakpoint(ErrorString*, const String& eventN
ame); |
| 71 virtual void removeInstrumentationBreakpoint(ErrorString*, const String& eve
ntName); | 70 virtual void removeInstrumentationBreakpoint(ErrorString*, const String& eve
ntName); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 90 void willFireAnimationFrame(Document*, int callbackId); | 89 void willFireAnimationFrame(Document*, int callbackId); |
| 91 void willHandleEvent(Event*); | 90 void willHandleEvent(Event*); |
| 92 void didFireWebGLError(Document*, const String& eventName, const String& con
soleMessage); | 91 void didFireWebGLError(Document*, const String& eventName, const String& con
soleMessage); |
| 93 | 92 |
| 94 void didProcessTask(); | 93 void didProcessTask(); |
| 95 | 94 |
| 96 virtual void clearFrontend(); | 95 virtual void clearFrontend(); |
| 97 virtual void discardAgent(); | 96 virtual void discardAgent(); |
| 98 | 97 |
| 99 private: | 98 private: |
| 100 InspectorDOMDebuggerAgent(InstrumentingAgents*, InspectorCompositeState*, In
spectorDOMAgent*, InspectorDebuggerAgent*, InspectorAgent*); | 99 InspectorDOMDebuggerAgent(InstrumentingAgents*, InspectorCompositeState*, In
spectorDOMAgent*, InspectorDebuggerAgent*); |
| 101 | 100 |
| 102 void pauseOnNativeEventIfNeeded(bool isDOMEvent, const String& eventName, bo
ol synchronous); | 101 void pauseOnNativeEventIfNeeded(bool isDOMEvent, const String& eventName, bo
ol synchronous); |
| 103 | 102 |
| 104 // InspectorDebuggerAgent::Listener implementation. | 103 // InspectorDebuggerAgent::Listener implementation. |
| 105 virtual void debuggerWasEnabled(); | 104 virtual void debuggerWasEnabled(); |
| 106 virtual void debuggerWasDisabled(); | 105 virtual void debuggerWasDisabled(); |
| 107 virtual void stepInto(); | 106 virtual void stepInto(); |
| 108 virtual void didPause(); | 107 virtual void didPause(); |
| 109 void disable(); | 108 void disable(); |
| 110 | 109 |
| 111 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion
, InspectorObject* description); | 110 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion
, InspectorObject* description); |
| 112 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set); | 111 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set); |
| 113 bool hasBreakpoint(Node*, int type); | 112 bool hasBreakpoint(Node*, int type); |
| 114 void discardBindings(); | 113 void discardBindings(); |
| 115 void setBreakpoint(ErrorString*, const String& eventName); | 114 void setBreakpoint(ErrorString*, const String& eventName); |
| 116 void removeBreakpoint(ErrorString*, const String& eventName); | 115 void removeBreakpoint(ErrorString*, const String& eventName); |
| 117 | 116 |
| 118 void clear(); | 117 void clear(); |
| 119 | 118 |
| 120 InspectorDOMAgent* m_domAgent; | 119 InspectorDOMAgent* m_domAgent; |
| 121 InspectorDebuggerAgent* m_debuggerAgent; | 120 InspectorDebuggerAgent* m_debuggerAgent; |
| 122 HashMap<Node*, uint32_t> m_domBreakpoints; | 121 HashMap<Node*, uint32_t> m_domBreakpoints; |
| 123 bool m_pauseInNextEventListener; | 122 bool m_pauseInNextEventListener; |
| 124 }; | 123 }; |
| 125 | 124 |
| 126 } // namespace WebCore | 125 } // namespace WebCore |
| 127 | 126 |
| 128 | 127 |
| 129 #endif // !defined(InspectorDOMDebuggerAgent_h) | 128 #endif // !defined(InspectorDOMDebuggerAgent_h) |
| OLD | NEW |