| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef PageDebuggerAgent_h | 31 #ifndef PageDebuggerAgent_h |
| 32 #define PageDebuggerAgent_h | 32 #define PageDebuggerAgent_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/inspector/InspectorDebuggerAgent.h" | 35 #include "core/inspector/InspectorDebuggerAgent.h" |
| 36 #include "core/inspector/InspectorOverlay.h" | |
| 37 | 36 |
| 38 using blink::TypeBuilder::Debugger::ExceptionDetails; | 37 using blink::TypeBuilder::Debugger::ExceptionDetails; |
| 39 using blink::TypeBuilder::Debugger::ScriptId; | 38 using blink::TypeBuilder::Debugger::ScriptId; |
| 40 using blink::TypeBuilder::Runtime::RemoteObject; | 39 using blink::TypeBuilder::Runtime::RemoteObject; |
| 41 | 40 |
| 42 namespace blink { | 41 namespace blink { |
| 43 | 42 |
| 44 class DocumentLoader; | 43 class DocumentLoader; |
| 45 class InspectorPageAgent; | 44 class InspectorPageAgent; |
| 46 class MainThreadDebugger; | 45 class MainThreadDebugger; |
| 47 | 46 |
| 48 class CORE_EXPORT PageDebuggerAgent final | 47 class CORE_EXPORT PageDebuggerAgent final |
| 49 : public InspectorDebuggerAgent | 48 : public InspectorDebuggerAgent { |
| 50 , public InspectorOverlay::Listener { | |
| 51 WTF_MAKE_NONCOPYABLE(PageDebuggerAgent); | 49 WTF_MAKE_NONCOPYABLE(PageDebuggerAgent); |
| 52 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PageDebuggerAgent); | 50 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(PageDebuggerAgent); |
| 53 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PageDebuggerAgent); | 51 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PageDebuggerAgent); |
| 54 public: | 52 public: |
| 55 static PassOwnPtrWillBeRawPtr<PageDebuggerAgent> create(MainThreadDebugger*,
InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*); | 53 static PassOwnPtrWillBeRawPtr<PageDebuggerAgent> create(MainThreadDebugger*,
InspectorPageAgent*, InjectedScriptManager*); |
| 56 ~PageDebuggerAgent() override; | 54 ~PageDebuggerAgent() override; |
| 57 DECLARE_VIRTUAL_TRACE(); | 55 DECLARE_VIRTUAL_TRACE(); |
| 58 | 56 |
| 59 void enable(ErrorString*) final; | 57 void enable(ErrorString*) final; |
| 60 void restore() final; | 58 void restore() final; |
| 61 void compileScript(ErrorString*, const String& expression, const String& sou
rceURL, bool persistScript, const int* executionContextId, TypeBuilder::OptOutpu
t<TypeBuilder::Debugger::ScriptId>*, RefPtr<TypeBuilder::Debugger::ExceptionDeta
ils>&) override; | 59 void compileScript(ErrorString*, const String& expression, const String& sou
rceURL, bool persistScript, const int* executionContextId, TypeBuilder::OptOutpu
t<TypeBuilder::Debugger::ScriptId>*, RefPtr<TypeBuilder::Debugger::ExceptionDeta
ils>&) override; |
| 62 void runScript(ErrorString*, const TypeBuilder::Debugger::ScriptId&, const i
nt* executionContextId, const String* objectGroup, const bool* doNotPauseOnExcep
tionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, RefPtr<
TypeBuilder::Debugger::ExceptionDetails>&) override; | 60 void runScript(ErrorString*, const TypeBuilder::Debugger::ScriptId&, const i
nt* executionContextId, const String* objectGroup, const bool* doNotPauseOnExcep
tionsAndMuteConsole, RefPtr<TypeBuilder::Runtime::RemoteObject>& result, RefPtr<
TypeBuilder::Debugger::ExceptionDetails>&) override; |
| 63 | 61 |
| 64 void didStartProvisionalLoad(LocalFrame*); | 62 void didStartProvisionalLoad(LocalFrame*); |
| 65 void didClearDocumentOfWindowObject(LocalFrame*); | 63 void didClearDocumentOfWindowObject(LocalFrame*); |
| 66 | 64 |
| 67 private: | 65 private: |
| 68 // V8DebuggerAgent::Client implemntation. | 66 // V8DebuggerAgent::Client implemntation. |
| 69 void debuggerAgentEnabled() override; | 67 void debuggerAgentEnabled() override; |
| 70 void debuggerAgentDisabled() override; | 68 void debuggerAgentDisabled() override; |
| 71 void muteConsole() override; | 69 void muteConsole() override; |
| 72 void unmuteConsole() override; | 70 void unmuteConsole() override; |
| 73 | 71 |
| 74 // InspectorOverlay::Listener implementation. | |
| 75 void overlayResumed() override; | |
| 76 void overlaySteppedOver() override; | |
| 77 | |
| 78 InjectedScript defaultInjectedScript() override; | 72 InjectedScript defaultInjectedScript() override; |
| 79 bool canExecuteScripts() const; | 73 bool canExecuteScripts() const; |
| 80 | 74 |
| 81 PageDebuggerAgent(MainThreadDebugger*, InspectorPageAgent*, InjectedScriptMa
nager*, InspectorOverlay*); | 75 PageDebuggerAgent(MainThreadDebugger*, InspectorPageAgent*, InjectedScriptMa
nager*); |
| 82 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; | 76 RawPtrWillBeMember<InspectorPageAgent> m_pageAgent; |
| 83 RawPtrWillBeMember<InspectorOverlay> m_overlay; | |
| 84 HashMap<String, String> m_compiledScriptURLs; | 77 HashMap<String, String> m_compiledScriptURLs; |
| 85 }; | 78 }; |
| 86 | 79 |
| 87 } // namespace blink | 80 } // namespace blink |
| 88 | 81 |
| 89 | 82 |
| 90 #endif // !defined(PageDebuggerAgent_h) | 83 #endif // !defined(PageDebuggerAgent_h) |
| OLD | NEW |