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 16 matching lines...) Expand all Loading... |
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 #include "config.h" | 31 #include "config.h" |
32 | 32 |
33 #include "core/inspector/WorkerInspectorController.h" | 33 #include "core/inspector/WorkerInspectorController.h" |
34 | 34 |
35 #include "core/InspectorBackendDispatcher.h" | 35 #include "core/InspectorBackendDispatcher.h" |
36 #include "core/InspectorFrontend.h" | 36 #include "core/InspectorFrontend.h" |
| 37 #include "core/inspector/EditedResourcesContentManager.h" |
37 #include "core/inspector/InjectedScriptHost.h" | 38 #include "core/inspector/InjectedScriptHost.h" |
38 #include "core/inspector/InjectedScriptManager.h" | 39 #include "core/inspector/InjectedScriptManager.h" |
39 #include "core/inspector/InspectorConsoleAgent.h" | 40 #include "core/inspector/InspectorConsoleAgent.h" |
40 #include "core/inspector/InspectorFrontendChannel.h" | 41 #include "core/inspector/InspectorFrontendChannel.h" |
41 #include "core/inspector/InspectorHeapProfilerAgent.h" | 42 #include "core/inspector/InspectorHeapProfilerAgent.h" |
42 #include "core/inspector/InspectorInstrumentation.h" | 43 #include "core/inspector/InspectorInstrumentation.h" |
43 #include "core/inspector/InspectorProfilerAgent.h" | 44 #include "core/inspector/InspectorProfilerAgent.h" |
44 #include "core/inspector/InspectorState.h" | 45 #include "core/inspector/InspectorState.h" |
45 #include "core/inspector/InspectorStateClient.h" | 46 #include "core/inspector/InspectorStateClient.h" |
46 #include "core/inspector/InspectorTimelineAgent.h" | 47 #include "core/inspector/InspectorTimelineAgent.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 }; | 88 }; |
88 | 89 |
89 } | 90 } |
90 | 91 |
91 WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGl
obalScope) | 92 WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGl
obalScope) |
92 : m_workerGlobalScope(workerGlobalScope) | 93 : m_workerGlobalScope(workerGlobalScope) |
93 , m_stateClient(adoptPtr(new WorkerStateClient(workerGlobalScope))) | 94 , m_stateClient(adoptPtr(new WorkerStateClient(workerGlobalScope))) |
94 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(m_stateClient.get()
))) | 95 , m_state(adoptPtrWillBeNoop(new InspectorCompositeState(m_stateClient.get()
))) |
95 , m_instrumentingAgents(InstrumentingAgents::create()) | 96 , m_instrumentingAgents(InstrumentingAgents::create()) |
96 , m_injectedScriptManager(InjectedScriptManager::createForWorker()) | 97 , m_injectedScriptManager(InjectedScriptManager::createForWorker()) |
| 98 , m_editedResourcesContentManager(EditedResourcesContentManager::create()) |
97 , m_debugServer(adoptPtr(new WorkerScriptDebugServer(workerGlobalScope))) | 99 , m_debugServer(adoptPtr(new WorkerScriptDebugServer(workerGlobalScope))) |
98 , m_agents(m_instrumentingAgents.get(), m_state.get()) | 100 , m_agents(m_instrumentingAgents.get(), m_state.get()) |
99 { | 101 { |
100 m_agents.append(WorkerRuntimeAgent::create(m_injectedScriptManager.get(), m_
debugServer.get(), workerGlobalScope)); | 102 m_agents.append(WorkerRuntimeAgent::create(m_injectedScriptManager.get(), m_
debugServer.get(), workerGlobalScope)); |
101 | 103 |
102 OwnPtrWillBeRawPtr<InspectorTimelineAgent> timelineAgent = InspectorTimeline
Agent::create(0, 0, 0, InspectorTimelineAgent::WorkerInspector, 0); | 104 OwnPtrWillBeRawPtr<InspectorTimelineAgent> timelineAgent = InspectorTimeline
Agent::create(0, 0, 0, InspectorTimelineAgent::WorkerInspector, 0); |
103 OwnPtrWillBeRawPtr<WorkerDebuggerAgent> workerDebuggerAgent = WorkerDebugger
Agent::create(m_debugServer.get(), workerGlobalScope, m_injectedScriptManager.ge
t()); | 105 OwnPtrWillBeRawPtr<WorkerDebuggerAgent> workerDebuggerAgent = WorkerDebugger
Agent::create(m_debugServer.get(), workerGlobalScope, m_injectedScriptManager.ge
t(), m_editedResourcesContentManager.get()); |
104 m_workerDebuggerAgent = workerDebuggerAgent.get(); | 106 m_workerDebuggerAgent = workerDebuggerAgent.get(); |
105 m_agents.append(workerDebuggerAgent.release()); | 107 m_agents.append(workerDebuggerAgent.release()); |
106 | 108 |
107 m_agents.append(InspectorProfilerAgent::create(m_injectedScriptManager.get()
, 0)); | 109 m_agents.append(InspectorProfilerAgent::create(m_injectedScriptManager.get()
, 0)); |
108 m_agents.append(InspectorHeapProfilerAgent::create(m_injectedScriptManager.g
et())); | 110 m_agents.append(InspectorHeapProfilerAgent::create(m_injectedScriptManager.g
et())); |
109 m_agents.append(WorkerConsoleAgent::create(timelineAgent.get(), m_injectedSc
riptManager.get())); | 111 m_agents.append(WorkerConsoleAgent::create(timelineAgent.get(), m_injectedSc
riptManager.get())); |
110 m_agents.append(timelineAgent.release()); | 112 m_agents.append(timelineAgent.release()); |
111 | 113 |
112 m_injectedScriptManager->injectedScriptHost()->init(m_instrumentingAgents.ge
t(), m_debugServer.get()); | 114 m_injectedScriptManager->injectedScriptHost()->init(m_instrumentingAgents.ge
t(), m_debugServer.get()); |
113 } | 115 } |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 { | 183 { |
182 visitor->trace(m_workerGlobalScope); | 184 visitor->trace(m_workerGlobalScope); |
183 visitor->trace(m_state); | 185 visitor->trace(m_state); |
184 visitor->trace(m_instrumentingAgents); | 186 visitor->trace(m_instrumentingAgents); |
185 visitor->trace(m_injectedScriptManager); | 187 visitor->trace(m_injectedScriptManager); |
186 m_agents.trace(visitor); | 188 m_agents.trace(visitor); |
187 visitor->trace(m_workerDebuggerAgent); | 189 visitor->trace(m_workerDebuggerAgent); |
188 } | 190 } |
189 | 191 |
190 } | 192 } |
OLD | NEW |