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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorDOMDebuggerAgent.h

Issue 1738073002: DevTools: introduce protocol::Value, baseline for hierarchical data in remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 28 matching lines...) Expand all
39 #include "wtf/HashMap.h" 39 #include "wtf/HashMap.h"
40 #include "wtf/PassOwnPtr.h" 40 #include "wtf/PassOwnPtr.h"
41 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class Element; 45 class Element;
46 class Event; 46 class Event;
47 class EventTarget; 47 class EventTarget;
48 class InspectorDOMAgent; 48 class InspectorDOMAgent;
49 class JSONObject;
50 class Node; 49 class Node;
51 class V8DebuggerAgent; 50 class V8DebuggerAgent;
52 class V8RuntimeAgent; 51 class V8RuntimeAgent;
53 52
53 namespace protocol {
54 class DictionaryValue;
55 }
56
54 typedef String ErrorString; 57 typedef String ErrorString;
55 58
56 class CORE_EXPORT InspectorDOMDebuggerAgent final 59 class CORE_EXPORT InspectorDOMDebuggerAgent final
57 : public InspectorBaseAgent<InspectorDOMDebuggerAgent, protocol::Frontend::D OMDebugger> 60 : public InspectorBaseAgent<InspectorDOMDebuggerAgent, protocol::Frontend::D OMDebugger>
58 , public protocol::Dispatcher::DOMDebuggerCommandHandler { 61 , public protocol::Dispatcher::DOMDebuggerCommandHandler {
59 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent); 62 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
60 public: 63 public:
61 static PassOwnPtrWillBeRawPtr<InspectorDOMDebuggerAgent> create(v8::Isolate* , InspectorDOMAgent*, V8RuntimeAgent*, V8DebuggerAgent*); 64 static PassOwnPtrWillBeRawPtr<InspectorDOMDebuggerAgent> create(v8::Isolate* , InspectorDOMAgent*, V8RuntimeAgent*, V8DebuggerAgent*);
62 65
63 static void eventListenersInfoForTarget(v8::Isolate*, v8::Local<v8::Value>, V8EventListenerInfoMap& listeners); 66 static void eventListenersInfoForTarget(v8::Isolate*, v8::Local<v8::Value>, V8EventListenerInfoMap& listeners);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void didFireWebGLErrorOrWarning(const String& message); 103 void didFireWebGLErrorOrWarning(const String& message);
101 void willCloseWindow(); 104 void willCloseWindow();
102 105
103 void disable(ErrorString*) override; 106 void disable(ErrorString*) override;
104 void restore() override; 107 void restore() override;
105 void didCommitLoadForLocalFrame(LocalFrame*) override; 108 void didCommitLoadForLocalFrame(LocalFrame*) override;
106 109
107 private: 110 private:
108 InspectorDOMDebuggerAgent(v8::Isolate*, InspectorDOMAgent*, V8RuntimeAgent*, V8DebuggerAgent*); 111 InspectorDOMDebuggerAgent(v8::Isolate*, InspectorDOMAgent*, V8RuntimeAgent*, V8DebuggerAgent*);
109 112
110 void pauseOnNativeEventIfNeeded(PassRefPtr<JSONObject> eventData, bool synch ronous); 113 void pauseOnNativeEventIfNeeded(PassRefPtr<protocol::DictionaryValue> eventD ata, bool synchronous);
111 PassRefPtr<JSONObject> preparePauseOnNativeEventData(const String& eventName , const String* targetName); 114 PassRefPtr<protocol::DictionaryValue> preparePauseOnNativeEventData(const St ring& eventName, const String* targetName);
112 115
113 PassRefPtr<JSONObject> eventListenerBreakpoints(); 116 PassRefPtr<protocol::DictionaryValue> eventListenerBreakpoints();
114 PassRefPtr<JSONObject> xhrBreakpoints(); 117 PassRefPtr<protocol::DictionaryValue> xhrBreakpoints();
115 118
116 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion , JSONObject* description); 119 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion , protocol::DictionaryValue* description);
117 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set); 120 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set);
118 bool hasBreakpoint(Node*, int type); 121 bool hasBreakpoint(Node*, int type);
119 void setBreakpoint(ErrorString*, const String& eventName, const String& targ etName); 122 void setBreakpoint(ErrorString*, const String& eventName, const String& targ etName);
120 void removeBreakpoint(ErrorString*, const String& eventName, const String& t argetName); 123 void removeBreakpoint(ErrorString*, const String& eventName, const String& t argetName);
121 124
122 void didAddBreakpoint(); 125 void didAddBreakpoint();
123 void didRemoveBreakpoint(); 126 void didRemoveBreakpoint();
124 void setEnabled(bool); 127 void setEnabled(bool);
125 128
126 void eventListeners(v8::Local<v8::Context>, v8::Local<v8::Value>, const Stri ng& objectGroup, protocol::Array<protocol::DOMDebugger::EventListener>* listener sArray); 129 void eventListeners(v8::Local<v8::Context>, v8::Local<v8::Value>, const Stri ng& objectGroup, protocol::Array<protocol::DOMDebugger::EventListener>* listener sArray);
127 PassOwnPtr<protocol::DOMDebugger::EventListener> buildObjectForEventListener (v8::Local<v8::Context>, const V8EventListenerInfo&, const String& objectGroupId ); 130 PassOwnPtr<protocol::DOMDebugger::EventListener> buildObjectForEventListener (v8::Local<v8::Context>, const V8EventListenerInfo&, const String& objectGroupId );
128 131
129 v8::Isolate* m_isolate; 132 v8::Isolate* m_isolate;
130 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; 133 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent;
131 V8RuntimeAgent* m_runtimeAgent; 134 V8RuntimeAgent* m_runtimeAgent;
132 V8DebuggerAgent* m_debuggerAgent; 135 V8DebuggerAgent* m_debuggerAgent;
133 WillBeHeapHashMap<RawPtrWillBeMember<Node>, uint32_t> m_domBreakpoints; 136 WillBeHeapHashMap<RawPtrWillBeMember<Node>, uint32_t> m_domBreakpoints;
134 }; 137 };
135 138
136 } // namespace blink 139 } // namespace blink
137 140
138 141
139 #endif // !defined(InspectorDOMDebuggerAgent_h) 142 #endif // !defined(InspectorDOMDebuggerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698