| 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 WorkerInspectorController_h | 31 #ifndef WorkerInspectorController_h |
| 32 #define WorkerInspectorController_h | 32 #define WorkerInspectorController_h |
| 33 | 33 |
| 34 #include "core/inspector/InspectorBaseAgent.h" | 34 #include "core/inspector/InspectorBaseAgent.h" |
| 35 #include "core/inspector/InspectorRuntimeAgent.h" | 35 #include "core/inspector/InspectorRuntimeAgent.h" |
| 36 #include "core/inspector/InspectorTaskRunner.h" |
| 36 #include "wtf/FastAllocBase.h" | 37 #include "wtf/FastAllocBase.h" |
| 37 #include "wtf/Forward.h" | 38 #include "wtf/Forward.h" |
| 38 #include "wtf/Noncopyable.h" | 39 #include "wtf/Noncopyable.h" |
| 39 #include "wtf/OwnPtr.h" | 40 #include "wtf/OwnPtr.h" |
| 40 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 | 44 |
| 44 class AsyncCallTracker; | 45 class AsyncCallTracker; |
| 45 class InjectedScriptManager; | 46 class InjectedScriptManager; |
| 46 class InspectorBackendDispatcher; | 47 class InspectorBackendDispatcher; |
| 47 class InspectorFrontend; | 48 class InspectorFrontend; |
| 48 class InspectorFrontendChannel; | 49 class InspectorFrontendChannel; |
| 49 class InspectorStateClient; | 50 class InspectorStateClient; |
| 50 class InspectorTaskRunner; | |
| 51 class InstrumentingAgents; | 51 class InstrumentingAgents; |
| 52 class WorkerDebuggerAgent; | 52 class WorkerDebuggerAgent; |
| 53 class WorkerGlobalScope; | 53 class WorkerGlobalScope; |
| 54 class WorkerRuntimeAgent; | 54 class WorkerRuntimeAgent; |
| 55 class WorkerThreadDebugger; | 55 class WorkerThreadDebugger; |
| 56 | 56 |
| 57 class WorkerInspectorController : public RefCountedWillBeGarbageCollectedFinaliz
ed<WorkerInspectorController>, public InspectorRuntimeAgent::Client { | 57 class WorkerInspectorController : public RefCountedWillBeGarbageCollectedFinaliz
ed<WorkerInspectorController>, public InspectorRuntimeAgent::Client { |
| 58 WTF_MAKE_NONCOPYABLE(WorkerInspectorController); | 58 WTF_MAKE_NONCOPYABLE(WorkerInspectorController); |
| 59 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(WorkerInspectorController); | 59 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(WorkerInspectorController); |
| 60 public: | 60 public: |
| 61 explicit WorkerInspectorController(WorkerGlobalScope*); | 61 explicit WorkerInspectorController(WorkerGlobalScope*); |
| 62 ~WorkerInspectorController(); | 62 ~WorkerInspectorController(); |
| 63 DECLARE_TRACE(); | 63 DECLARE_TRACE(); |
| 64 | 64 |
| 65 void registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAgent>); | 65 void registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAgent>); |
| 66 void connectFrontend(); | 66 void connectFrontend(); |
| 67 void disconnectFrontend(); | 67 void disconnectFrontend(); |
| 68 void restoreInspectorStateFromCookie(const String& inspectorCookie); | 68 void restoreInspectorStateFromCookie(const String& inspectorCookie); |
| 69 void dispatchMessageFromFrontend(const String&); | 69 void dispatchMessageFromFrontend(const String&); |
| 70 void dispose(); | 70 void dispose(); |
| 71 void interruptAndDispatchInspectorCommands(); | 71 void interruptAndDispatchInspectorCommands(); |
| 72 | 72 |
| 73 void pauseOnStart(); | 73 void workerContextInitialized(bool pauseOnStart); |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 friend InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobal
Scope*); | 76 friend InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobal
Scope*); |
| 77 | 77 |
| 78 // InspectorRuntimeAgent::Client implementation. | 78 // InspectorRuntimeAgent::Client implementation. |
| 79 void pauseOnStart(); |
| 79 void resumeStartup() override; | 80 void resumeStartup() override; |
| 80 bool isRunRequired() override; | 81 bool isRunRequired() override; |
| 81 | 82 |
| 82 RawPtrWillBeMember<WorkerGlobalScope> m_workerGlobalScope; | 83 RawPtrWillBeMember<WorkerGlobalScope> m_workerGlobalScope; |
| 83 OwnPtr<InspectorStateClient> m_stateClient; | 84 OwnPtr<InspectorStateClient> m_stateClient; |
| 84 OwnPtrWillBeMember<InspectorCompositeState> m_state; | 85 OwnPtrWillBeMember<InspectorCompositeState> m_state; |
| 85 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; | 86 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; |
| 86 OwnPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 87 OwnPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
| 87 OwnPtrWillBeMember<WorkerThreadDebugger> m_workerThreadDebugger; | 88 OwnPtrWillBeMember<WorkerThreadDebugger> m_workerThreadDebugger; |
| 88 InspectorAgentRegistry m_agents; | 89 InspectorAgentRegistry m_agents; |
| 89 OwnPtr<InspectorFrontendChannel> m_frontendChannel; | 90 OwnPtr<InspectorFrontendChannel> m_frontendChannel; |
| 90 OwnPtr<InspectorFrontend> m_frontend; | 91 OwnPtr<InspectorFrontend> m_frontend; |
| 91 RefPtrWillBeMember<InspectorBackendDispatcher> m_backendDispatcher; | 92 RefPtrWillBeMember<InspectorBackendDispatcher> m_backendDispatcher; |
| 92 RawPtrWillBeMember<WorkerDebuggerAgent> m_workerDebuggerAgent; | 93 RawPtrWillBeMember<WorkerDebuggerAgent> m_workerDebuggerAgent; |
| 93 OwnPtrWillBeMember<AsyncCallTracker> m_asyncCallTracker; | 94 OwnPtrWillBeMember<AsyncCallTracker> m_asyncCallTracker; |
| 94 RawPtrWillBeMember<WorkerRuntimeAgent> m_workerRuntimeAgent; | 95 RawPtrWillBeMember<WorkerRuntimeAgent> m_workerRuntimeAgent; |
| 95 OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner; | 96 OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner; |
| 97 OwnPtr<InspectorTaskRunner::IgnoreInterruptsScope> m_beforeInitlizedScope; |
| 96 bool m_paused; | 98 bool m_paused; |
| 97 }; | 99 }; |
| 98 | 100 |
| 99 } | 101 } |
| 100 | 102 |
| 101 #endif // WorkerInspectorController_h | 103 #endif // WorkerInspectorController_h |
| OLD | NEW |