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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 17 matching lines...) Expand all
28 */ 28 */
29 29
30 #ifndef InspectorDebuggerAgent_h 30 #ifndef InspectorDebuggerAgent_h
31 #define InspectorDebuggerAgent_h 31 #define InspectorDebuggerAgent_h
32 32
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "core/inspector/V8DebuggerAgent.h" 34 #include "core/inspector/V8DebuggerAgent.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class CORE_EXPORT InspectorDebuggerAgent : public V8DebuggerAgent { 38 class CORE_EXPORT InspectorDebuggerAgent
39 : public V8DebuggerAgent
40 , public V8DebuggerAgent::Client {
39 public: 41 public:
40 ~InspectorDebuggerAgent() override; 42 ~InspectorDebuggerAgent() override;
43 DECLARE_VIRTUAL_TRACE();
44
41 void enable(ErrorString*) override; 45 void enable(ErrorString*) override;
42 46
47 // V8DebuggerAgent::Client implementation.
48 void startListeningV8Debugger() override;
49 void stopListeningV8Debugger() override;
50 bool canPauseOnPromiseEvent() final;
51 void didCreatePromise() final;
52 void didResolvePromise() final;
53 void didRejectPromise() final;
54
55 class CORE_EXPORT Listener : public WillBeGarbageCollectedMixin {
56 public:
57 virtual ~Listener() { }
58 virtual void debuggerWasEnabled() = 0;
59 virtual void debuggerWasDisabled() = 0;
60 virtual bool canPauseOnPromiseEvent() = 0;
dgozman 2015/08/12 02:00:05 canPauseXXX is a strange method for the Listener.
61 virtual void didCreatePromise() = 0;
62 virtual void didResolvePromise() = 0;
63 virtual void didRejectPromise() = 0;
64 };
65 void setListener(Listener* listener) { m_listener = listener; }
66
43 protected: 67 protected:
44 InspectorDebuggerAgent(InjectedScriptManager*, V8Debugger*); 68 InspectorDebuggerAgent(InjectedScriptManager*, V8Debugger*);
45 69
46 void enable() override; 70 private:
47 void disable() override; 71 RawPtrWillBeMember<Listener> m_listener;
48 }; 72 };
49 73
50 } // namespace blink 74 } // namespace blink
51 75
52 76
53 #endif // !defined(InspectorDebuggerAgent_h) 77 #endif // !defined(InspectorDebuggerAgent_h)
OLDNEW
« 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