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

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

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 2 Created 4 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class EventTarget; 47 class EventTarget;
48 class InspectorDOMAgent; 48 class InspectorDOMAgent;
49 class Node; 49 class Node;
50 class V8DebuggerAgent; 50 class V8DebuggerAgent;
51 class V8RuntimeAgent; 51 class V8RuntimeAgent;
52 52
53 namespace protocol { 53 namespace protocol {
54 class DictionaryValue; 54 class DictionaryValue;
55 } 55 }
56 56
57 typedef String ErrorString;
58
59 class CORE_EXPORT InspectorDOMDebuggerAgent final 57 class CORE_EXPORT InspectorDOMDebuggerAgent final
60 : public InspectorBaseAgent<InspectorDOMDebuggerAgent, protocol::Frontend::D OMDebugger> 58 : public InspectorBaseAgent<InspectorDOMDebuggerAgent, protocol::Frontend::D OMDebugger>
61 , public protocol::Dispatcher::DOMDebuggerCommandHandler { 59 , public protocol::Dispatcher::DOMDebuggerCommandHandler {
62 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent); 60 WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
63 public: 61 public:
64 static PassOwnPtrWillBeRawPtr<InspectorDOMDebuggerAgent> create(v8::Isolate* , InspectorDOMAgent*, V8RuntimeAgent*, V8DebuggerAgent*); 62 static PassOwnPtrWillBeRawPtr<InspectorDOMDebuggerAgent> create(v8::Isolate* , InspectorDOMAgent*, V8RuntimeAgent*, V8DebuggerAgent*);
65 63
66 static void eventListenersInfoForTarget(v8::Isolate*, v8::Local<v8::Value>, V8EventListenerInfoMap& listeners); 64 static void eventListenersInfoForTarget(v8::Isolate*, v8::Local<v8::Value>, V8EventListenerInfoMap& listeners);
67 65
68 ~InspectorDOMDebuggerAgent() override; 66 ~InspectorDOMDebuggerAgent() override;
69 DECLARE_VIRTUAL_TRACE(); 67 DECLARE_VIRTUAL_TRACE();
70 68
71 // DOMDebugger API for InspectorFrontend 69 // DOMDebugger API for InspectorFrontend
72 void setDOMBreakpoint(ErrorString*, int nodeId, const String& type) override ; 70 void setDOMBreakpoint(ErrorString*, int nodeId, const String& type) override ;
73 void removeDOMBreakpoint(ErrorString*, int nodeId, const String& type) overr ide; 71 void removeDOMBreakpoint(ErrorString*, int nodeId, const String& type) overr ide;
74 void setEventListenerBreakpoint(ErrorString*, const String& eventName, const Maybe<String>& targetName) override; 72 void setEventListenerBreakpoint(ErrorString*, const String& eventName, const Maybe<String>& targetName) override;
75 void removeEventListenerBreakpoint(ErrorString*, const String& eventName, co nst Maybe<String>& targetName) override; 73 void removeEventListenerBreakpoint(ErrorString*, const String& eventName, co nst Maybe<String>& targetName) override;
76 void setInstrumentationBreakpoint(ErrorString*, const String& eventName) ove rride; 74 void setInstrumentationBreakpoint(ErrorString*, const String& eventName) ove rride;
77 void removeInstrumentationBreakpoint(ErrorString*, const String& eventName) override; 75 void removeInstrumentationBreakpoint(ErrorString*, const String& eventName) override;
78 void setXHRBreakpoint(ErrorString*, const String& url) override; 76 void setXHRBreakpoint(ErrorString*, const String& url) override;
79 void removeXHRBreakpoint(ErrorString*, const String& url) override; 77 void removeXHRBreakpoint(ErrorString*, const String& url) override;
80 void getEventListeners(ErrorString*, const String& objectId, OwnPtr<protocol ::Array<protocol::DOMDebugger::EventListener>>* listeners) override; 78 void getEventListeners(ErrorString*, const String16& objectId, OwnPtr<protoc ol::Array<protocol::DOMDebugger::EventListener>>* listeners) override;
81 79
82 // InspectorInstrumentation API 80 // InspectorInstrumentation API
83 void willInsertDOMNode(Node* parent); 81 void willInsertDOMNode(Node* parent);
84 void didInvalidateStyleAttr(Node*); 82 void didInvalidateStyleAttr(Node*);
85 void didInsertDOMNode(Node*); 83 void didInsertDOMNode(Node*);
86 void willRemoveDOMNode(Node*); 84 void willRemoveDOMNode(Node*);
87 void didRemoveDOMNode(Node*); 85 void didRemoveDOMNode(Node*);
88 void willModifyDOMAttr(Element*, const AtomicString&, const AtomicString&); 86 void willModifyDOMAttr(Element*, const AtomicString&, const AtomicString&);
89 void willSetInnerHTML(); 87 void willSetInnerHTML();
90 void willSendXMLHttpRequest(const String& url); 88 void willSendXMLHttpRequest(const String& url);
(...skipping 28 matching lines...) Expand all
119 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion , protocol::DictionaryValue* description); 117 void descriptionForDOMEvent(Node* target, int breakpointType, bool insertion , protocol::DictionaryValue* description);
120 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set); 118 void updateSubtreeBreakpoints(Node*, uint32_t rootMask, bool set);
121 bool hasBreakpoint(Node*, int type); 119 bool hasBreakpoint(Node*, int type);
122 void setBreakpoint(ErrorString*, const String& eventName, const String& targ etName); 120 void setBreakpoint(ErrorString*, const String& eventName, const String& targ etName);
123 void removeBreakpoint(ErrorString*, const String& eventName, const String& t argetName); 121 void removeBreakpoint(ErrorString*, const String& eventName, const String& t argetName);
124 122
125 void didAddBreakpoint(); 123 void didAddBreakpoint();
126 void didRemoveBreakpoint(); 124 void didRemoveBreakpoint();
127 void setEnabled(bool); 125 void setEnabled(bool);
128 126
129 void eventListeners(v8::Local<v8::Context>, v8::Local<v8::Value>, const Stri ng& objectGroup, protocol::Array<protocol::DOMDebugger::EventListener>* listener sArray); 127 void eventListeners(v8::Local<v8::Context>, v8::Local<v8::Value>, const Stri ng16& objectGroup, protocol::Array<protocol::DOMDebugger::EventListener>* listen ersArray);
130 PassOwnPtr<protocol::DOMDebugger::EventListener> buildObjectForEventListener (v8::Local<v8::Context>, const V8EventListenerInfo&, const String& objectGroupId ); 128 PassOwnPtr<protocol::DOMDebugger::EventListener> buildObjectForEventListener (v8::Local<v8::Context>, const V8EventListenerInfo&, const String16& objectGroup Id);
131 129
132 v8::Isolate* m_isolate; 130 v8::Isolate* m_isolate;
133 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent; 131 RawPtrWillBeMember<InspectorDOMAgent> m_domAgent;
134 V8RuntimeAgent* m_runtimeAgent; 132 V8RuntimeAgent* m_runtimeAgent;
135 V8DebuggerAgent* m_debuggerAgent; 133 V8DebuggerAgent* m_debuggerAgent;
136 WillBeHeapHashMap<RawPtrWillBeMember<Node>, uint32_t> m_domBreakpoints; 134 WillBeHeapHashMap<RawPtrWillBeMember<Node>, uint32_t> m_domBreakpoints;
137 }; 135 };
138 136
139 } // namespace blink 137 } // namespace blink
140 138
141 139
142 #endif // !defined(InspectorDOMDebuggerAgent_h) 140 #endif // !defined(InspectorDOMDebuggerAgent_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698