Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: Source/WebCore/inspector/WorkerInspectorController.cpp

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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 #include "config.h" 31 #include "config.h"
32 32
33 #if ENABLE(INSPECTOR) && ENABLE(WORKERS) 33 #if ENABLE(WORKERS)
34 34
35 #include "WorkerInspectorController.h" 35 #include "WorkerInspectorController.h"
36 36
37 #include "InjectedScriptHost.h" 37 #include "InjectedScriptHost.h"
38 #include "InjectedScriptManager.h" 38 #include "InjectedScriptManager.h"
39 #include "InspectorBackendDispatcher.h" 39 #include "InspectorBackendDispatcher.h"
40 #include "InspectorClient.h" 40 #include "InspectorClient.h"
41 #include "InspectorConsoleAgent.h" 41 #include "InspectorConsoleAgent.h"
42 #include "InspectorFrontend.h" 42 #include "InspectorFrontend.h"
43 #include "InspectorFrontendChannel.h" 43 #include "InspectorFrontendChannel.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 , m_state(adoptPtr(new InspectorCompositeState(m_stateClient.get()))) 97 , m_state(adoptPtr(new InspectorCompositeState(m_stateClient.get())))
98 , m_instrumentingAgents(InstrumentingAgents::create()) 98 , m_instrumentingAgents(InstrumentingAgents::create())
99 , m_injectedScriptManager(InjectedScriptManager::createForWorker()) 99 , m_injectedScriptManager(InjectedScriptManager::createForWorker())
100 , m_runtimeAgent(0) 100 , m_runtimeAgent(0)
101 { 101 {
102 OwnPtr<InspectorRuntimeAgent> runtimeAgent = WorkerRuntimeAgent::create(m_in strumentingAgents.get(), m_state.get(), m_injectedScriptManager.get(), workerCon text); 102 OwnPtr<InspectorRuntimeAgent> runtimeAgent = WorkerRuntimeAgent::create(m_in strumentingAgents.get(), m_state.get(), m_injectedScriptManager.get(), workerCon text);
103 m_runtimeAgent = runtimeAgent.get(); 103 m_runtimeAgent = runtimeAgent.get();
104 m_agents.append(runtimeAgent.release()); 104 m_agents.append(runtimeAgent.release());
105 105
106 OwnPtr<InspectorConsoleAgent> consoleAgent = WorkerConsoleAgent::create(m_in strumentingAgents.get(), m_state.get(), m_injectedScriptManager.get()); 106 OwnPtr<InspectorConsoleAgent> consoleAgent = WorkerConsoleAgent::create(m_in strumentingAgents.get(), m_state.get(), m_injectedScriptManager.get());
107 #if ENABLE(JAVASCRIPT_DEBUGGER)
108 OwnPtr<InspectorDebuggerAgent> debuggerAgent = WorkerDebuggerAgent::create(m _instrumentingAgents.get(), m_state.get(), workerContext, m_injectedScriptManage r.get()); 107 OwnPtr<InspectorDebuggerAgent> debuggerAgent = WorkerDebuggerAgent::create(m _instrumentingAgents.get(), m_state.get(), workerContext, m_injectedScriptManage r.get());
109 InspectorDebuggerAgent* debuggerAgentPtr = debuggerAgent.get(); 108 InspectorDebuggerAgent* debuggerAgentPtr = debuggerAgent.get();
110 m_runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer()); 109 m_runtimeAgent->setScriptDebugServer(&debuggerAgent->scriptDebugServer());
111 m_agents.append(debuggerAgent.release()); 110 m_agents.append(debuggerAgent.release());
112 111
113 m_agents.append(InspectorProfilerAgent::create(m_instrumentingAgents.get(), consoleAgent.get(), workerContext, m_state.get(), m_injectedScriptManager.get()) ); 112 m_agents.append(InspectorProfilerAgent::create(m_instrumentingAgents.get(), consoleAgent.get(), workerContext, m_state.get(), m_injectedScriptManager.get()) );
114 m_agents.append(InspectorHeapProfilerAgent::create(m_instrumentingAgents.get (), m_state.get(), m_injectedScriptManager.get())); 113 m_agents.append(InspectorHeapProfilerAgent::create(m_instrumentingAgents.get (), m_state.get(), m_injectedScriptManager.get()));
115 #endif
116 m_agents.append(InspectorTimelineAgent::create(m_instrumentingAgents.get(), 0, 0, m_state.get(), InspectorTimelineAgent::WorkerInspector, 0)); 114 m_agents.append(InspectorTimelineAgent::create(m_instrumentingAgents.get(), 0, 0, m_state.get(), InspectorTimelineAgent::WorkerInspector, 0));
117 m_agents.append(consoleAgent.release()); 115 m_agents.append(consoleAgent.release());
118 116
119 m_injectedScriptManager->injectedScriptHost()->init(0 117 m_injectedScriptManager->injectedScriptHost()->init(0
120 , 0 118 , 0
121 #if ENABLE(SQL_DATABASE) 119 #if ENABLE(SQL_DATABASE)
122 , 0 120 , 0
123 #endif 121 #endif
124 , 0 122 , 0
125 , 0 123 , 0
126 #if ENABLE(JAVASCRIPT_DEBUGGER)
127 , debuggerAgentPtr 124 , debuggerAgentPtr
128 #endif
129 ); 125 );
130 } 126 }
131 127
132 WorkerInspectorController::~WorkerInspectorController() 128 WorkerInspectorController::~WorkerInspectorController()
133 { 129 {
134 m_instrumentingAgents->reset(); 130 m_instrumentingAgents->reset();
135 disconnectFrontend(); 131 disconnectFrontend();
136 } 132 }
137 133
138 void WorkerInspectorController::connectFrontend() 134 void WorkerInspectorController::connectFrontend()
(...skipping 29 matching lines...) Expand all
168 164
169 m_agents.restore(); 165 m_agents.restore();
170 } 166 }
171 167
172 void WorkerInspectorController::dispatchMessageFromFrontend(const String& messag e) 168 void WorkerInspectorController::dispatchMessageFromFrontend(const String& messag e)
173 { 169 {
174 if (m_backendDispatcher) 170 if (m_backendDispatcher)
175 m_backendDispatcher->dispatch(message); 171 m_backendDispatcher->dispatch(message);
176 } 172 }
177 173
178 #if ENABLE(JAVASCRIPT_DEBUGGER)
179 void WorkerInspectorController::resume() 174 void WorkerInspectorController::resume()
180 { 175 {
181 ErrorString unused; 176 ErrorString unused;
182 m_runtimeAgent->run(&unused); 177 m_runtimeAgent->run(&unused);
183 } 178 }
184 #endif
185 179
186 } 180 }
187 181
188 #endif 182 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698