OLD | NEW |
---|---|
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 Loading... | |
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) |
OLD | NEW |