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

Unified Diff: Source/core/inspector/InspectorDebuggerAgent.h

Issue 1291613002: DevTools: make V8DebuggerAgent call Client instead of overriden methods (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Changed Client to only return defaultInjectedScript Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorDebuggerAgent.h
diff --git a/Source/core/inspector/InspectorDebuggerAgent.h b/Source/core/inspector/InspectorDebuggerAgent.h
index 5c1febac513706ecde09cb3b206ddcef32ac38ed..a0116d4e61c539729ec9c6a367c43fdab420fa71 100644
--- a/Source/core/inspector/InspectorDebuggerAgent.h
+++ b/Source/core/inspector/InspectorDebuggerAgent.h
@@ -35,16 +35,40 @@
namespace blink {
-class CORE_EXPORT InspectorDebuggerAgent : public V8DebuggerAgent {
+class CORE_EXPORT InspectorDebuggerAgent
+ : public V8DebuggerAgent
+ , public V8DebuggerAgent::Client {
public:
~InspectorDebuggerAgent() override;
+ DECLARE_VIRTUAL_TRACE();
+
void enable(ErrorString*) override;
+ // V8DebuggerAgent::Client implementation.
+ void startListeningV8Debugger() override;
+ void stopListeningV8Debugger() override;
+ bool canPauseOnPromiseEvent() final;
+ void didCreatePromise() final;
+ void didResolvePromise() final;
+ void didRejectPromise() final;
+
+ class CORE_EXPORT Listener : public WillBeGarbageCollectedMixin {
+ public:
+ virtual ~Listener() { }
+ virtual void debuggerWasEnabled() = 0;
+ virtual void debuggerWasDisabled() = 0;
+ virtual bool canPauseOnPromiseEvent() = 0;
dgozman 2015/08/12 02:00:05 canPauseXXX is a strange method for the Listener.
+ virtual void didCreatePromise() = 0;
+ virtual void didResolvePromise() = 0;
+ virtual void didRejectPromise() = 0;
+ };
+ void setListener(Listener* listener) { m_listener = listener; }
+
protected:
InspectorDebuggerAgent(InjectedScriptManager*, V8Debugger*);
- void enable() override;
- void disable() override;
+private:
+ RawPtrWillBeMember<Listener> m_listener;
};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/inspector/InspectorDebuggerAgent.cpp » ('j') | Source/core/inspector/V8DebuggerAgent.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698