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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class InspectorBackendDispatcher; | 46 class InspectorBackendDispatcher; |
47 class InspectorFrontend; | 47 class InspectorFrontend; |
48 class InspectorFrontendChannel; | 48 class InspectorFrontendChannel; |
49 class InspectorStateClient; | 49 class InspectorStateClient; |
50 class InstrumentingAgents; | 50 class InstrumentingAgents; |
51 class WorkerDebuggerAgent; | 51 class WorkerDebuggerAgent; |
52 class WorkerGlobalScope; | 52 class WorkerGlobalScope; |
53 class WorkerRuntimeAgent; | 53 class WorkerRuntimeAgent; |
54 class WorkerThreadDebugger; | 54 class WorkerThreadDebugger; |
55 | 55 |
56 class WorkerInspectorController : public RefCountedWillBeGarbageCollectedFinaliz
ed<WorkerInspectorController>, public InspectorRuntimeAgent::Client { | 56 class WorkerInspectorController final : public RefCountedWillBeGarbageCollectedF
inalized<WorkerInspectorController>, public InspectorRuntimeAgent::Client { |
57 WTF_MAKE_NONCOPYABLE(WorkerInspectorController); | 57 WTF_MAKE_NONCOPYABLE(WorkerInspectorController); |
58 USING_FAST_MALLOC_WILL_BE_REMOVED(WorkerInspectorController); | 58 USING_FAST_MALLOC_WILL_BE_REMOVED(WorkerInspectorController); |
59 public: | 59 public: |
60 explicit WorkerInspectorController(WorkerGlobalScope*); | 60 explicit WorkerInspectorController(WorkerGlobalScope*); |
61 ~WorkerInspectorController(); | 61 ~WorkerInspectorController(); |
62 DECLARE_TRACE(); | 62 DECLARE_TRACE(); |
63 | 63 |
64 void registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAgent>); | 64 void registerModuleAgent(PassOwnPtrWillBeRawPtr<InspectorAgent>); |
65 void connectFrontend(); | 65 void connectFrontend(); |
66 void disconnectFrontend(); | 66 void disconnectFrontend(); |
67 void restoreInspectorStateFromCookie(const String& inspectorCookie); | 67 void restoreInspectorStateFromCookie(const String& inspectorCookie); |
68 void dispatchMessageFromFrontend(const String&); | 68 void dispatchMessageFromFrontend(const String&); |
69 void dispose(); | 69 void dispose(); |
70 void interruptAndDispatchInspectorCommands(); | 70 void interruptAndDispatchInspectorCommands(); |
71 | 71 |
72 void workerContextInitialized(bool pauseOnStart); | 72 void workerContextInitialized(bool pauseOnStart); |
73 | 73 |
74 private: | 74 private: |
75 friend InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobal
Scope*); | 75 friend InstrumentingAgents* instrumentationForWorkerGlobalScope(WorkerGlobal
Scope*); |
76 | 76 |
77 // InspectorRuntimeAgent::Client implementation. | 77 // InspectorRuntimeAgent::Client implementation. |
78 void pauseOnStart(); | 78 void pauseOnStart(); |
79 void resumeStartup() override; | 79 void resumeStartup() override; |
80 bool isRunRequired() override; | 80 bool isRunRequired() override; |
81 | 81 |
| 82 class PageInspectorProxy; |
| 83 friend WTF::OwnedPtrDeleter<PageInspectorProxy>; |
| 84 |
| 85 InspectorFrontendChannel* frontendChannel() const; |
| 86 |
82 RawPtrWillBeMember<WorkerGlobalScope> m_workerGlobalScope; | 87 RawPtrWillBeMember<WorkerGlobalScope> m_workerGlobalScope; |
83 OwnPtr<InspectorStateClient> m_stateClient; | 88 OwnPtr<InspectorStateClient> m_stateClient; |
84 OwnPtrWillBeMember<InspectorCompositeState> m_state; | 89 OwnPtrWillBeMember<InspectorCompositeState> m_state; |
85 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; | 90 RefPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; |
86 OwnPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 91 OwnPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
87 OwnPtr<WorkerThreadDebugger> m_workerThreadDebugger; | 92 OwnPtr<WorkerThreadDebugger> m_workerThreadDebugger; |
88 InspectorAgentRegistry m_agents; | 93 InspectorAgentRegistry m_agents; |
89 OwnPtr<InspectorFrontendChannel> m_frontendChannel; | 94 OwnPtrWillBeMember<PageInspectorProxy> m_pageInspectorProxy; |
90 OwnPtr<InspectorFrontend> m_frontend; | 95 OwnPtr<InspectorFrontend> m_frontend; |
91 RefPtrWillBeMember<InspectorBackendDispatcher> m_backendDispatcher; | 96 RefPtrWillBeMember<InspectorBackendDispatcher> m_backendDispatcher; |
92 RawPtrWillBeMember<WorkerDebuggerAgent> m_workerDebuggerAgent; | 97 RawPtrWillBeMember<WorkerDebuggerAgent> m_workerDebuggerAgent; |
93 RawPtrWillBeMember<WorkerRuntimeAgent> m_workerRuntimeAgent; | 98 RawPtrWillBeMember<WorkerRuntimeAgent> m_workerRuntimeAgent; |
94 OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner; | 99 OwnPtr<InspectorTaskRunner> m_inspectorTaskRunner; |
95 OwnPtr<InspectorTaskRunner::IgnoreInterruptsScope> m_beforeInitlizedScope; | 100 OwnPtr<InspectorTaskRunner::IgnoreInterruptsScope> m_beforeInitlizedScope; |
96 bool m_paused; | 101 bool m_paused; |
97 }; | 102 }; |
98 | 103 |
99 } | 104 } |
100 | 105 |
101 #endif // WorkerInspectorController_h | 106 #endif // WorkerInspectorController_h |
OLD | NEW |