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

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

Issue 7062044: Merge 86507 - 2011-05-15 Ilya Tikhonovsky <loislo@chromium.org> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/742/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « Source/WebCore/inspector/InspectorController.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 m_openingFrontend = false; 105 m_openingFrontend = false;
106 m_inspectorFrontend = new InspectorFrontend(m_inspectorClient); 106 m_inspectorFrontend = new InspectorFrontend(m_inspectorClient);
107 m_injectedScriptManager->injectedScriptHost()->setFrontend(m_inspectorFronte nd.get()); 107 m_injectedScriptManager->injectedScriptHost()->setFrontend(m_inspectorFronte nd.get());
108 m_inspectorAgent->setFrontend(m_inspectorFrontend.get()); 108 m_inspectorAgent->setFrontend(m_inspectorFrontend.get());
109 109
110 if (!InspectorInstrumentation::hasFrontends()) 110 if (!InspectorInstrumentation::hasFrontends())
111 ScriptController::setCaptureCallStackForUncaughtExceptions(true); 111 ScriptController::setCaptureCallStackForUncaughtExceptions(true);
112 InspectorInstrumentation::frontendCreated(); 112 InspectorInstrumentation::frontendCreated();
113 113
114 ASSERT(m_inspectorClient); 114 ASSERT(m_inspectorClient);
115 m_inspectorBackendDispatcher = new InspectorBackendDispatcher( 115 m_inspectorBackendDispatcher = adoptRef(new InspectorBackendDispatcher(
116 m_inspectorClient, 116 m_inspectorClient,
117 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 117 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
118 m_inspectorAgent->applicationCacheAgent(), 118 m_inspectorAgent->applicationCacheAgent(),
119 #endif 119 #endif
120 #if ENABLE(JAVASCRIPT_DEBUGGER) 120 #if ENABLE(JAVASCRIPT_DEBUGGER)
121 m_inspectorAgent->browserDebuggerAgent(), 121 m_inspectorAgent->browserDebuggerAgent(),
122 #endif 122 #endif
123 m_inspectorAgent->cssAgent(), 123 m_inspectorAgent->cssAgent(),
124 m_inspectorAgent->consoleAgent(), 124 m_inspectorAgent->consoleAgent(),
125 m_inspectorAgent->domAgent(), 125 m_inspectorAgent->domAgent(),
126 #if ENABLE(DOM_STORAGE) 126 #if ENABLE(DOM_STORAGE)
127 m_inspectorAgent->domStorageAgent(), 127 m_inspectorAgent->domStorageAgent(),
128 #endif 128 #endif
129 #if ENABLE(DATABASE) 129 #if ENABLE(DATABASE)
130 m_inspectorAgent->databaseAgent(), 130 m_inspectorAgent->databaseAgent(),
131 #endif 131 #endif
132 #if ENABLE(JAVASCRIPT_DEBUGGER) 132 #if ENABLE(JAVASCRIPT_DEBUGGER)
133 m_inspectorAgent->debuggerAgent(), 133 m_inspectorAgent->debuggerAgent(),
134 #endif 134 #endif
135 m_inspectorAgent->resourceAgent(), 135 m_inspectorAgent->resourceAgent(),
136 m_inspectorAgent->pageAgent(), 136 m_inspectorAgent->pageAgent(),
137 #if ENABLE(JAVASCRIPT_DEBUGGER) 137 #if ENABLE(JAVASCRIPT_DEBUGGER)
138 m_inspectorAgent->profilerAgent(), 138 m_inspectorAgent->profilerAgent(),
139 #endif 139 #endif
140 m_inspectorAgent->runtimeAgent(), 140 m_inspectorAgent->runtimeAgent(),
141 m_inspectorAgent->timelineAgent()); 141 m_inspectorAgent->timelineAgent()));
142 142
143 if (m_startUserInitiatedDebuggingWhenFrontedIsConnected) { 143 if (m_startUserInitiatedDebuggingWhenFrontedIsConnected) {
144 m_inspectorFrontend->inspector()->startUserInitiatedDebugging(); 144 m_inspectorFrontend->inspector()->startUserInitiatedDebugging();
145 m_startUserInitiatedDebuggingWhenFrontedIsConnected = false; 145 m_startUserInitiatedDebuggingWhenFrontedIsConnected = false;
146 } 146 }
147 } 147 }
148 148
149 void InspectorController::disconnectFrontend() 149 void InspectorController::disconnectFrontend()
150 { 150 {
151 if (!m_inspectorFrontend) 151 if (!m_inspectorFrontend)
152 return; 152 return;
153 m_inspectorBackendDispatcher->clearFrontend();
153 m_inspectorBackendDispatcher.clear(); 154 m_inspectorBackendDispatcher.clear();
154 155
155 m_inspectorAgent->disconnectFrontend(); 156 m_inspectorAgent->disconnectFrontend();
156 m_injectedScriptManager->injectedScriptHost()->clearFrontend(); 157 m_injectedScriptManager->injectedScriptHost()->clearFrontend();
157 158
158 m_inspectorFrontend.clear(); 159 m_inspectorFrontend.clear();
159 160
160 InspectorInstrumentation::frontendDeleted(); 161 InspectorInstrumentation::frontendDeleted();
161 if (!InspectorInstrumentation::hasFrontends()) 162 if (!InspectorInstrumentation::hasFrontends())
162 ScriptController::setCaptureCallStackForUncaughtExceptions(false); 163 ScriptController::setCaptureCallStackForUncaughtExceptions(false);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 ErrorString error; 325 ErrorString error;
325 debuggerAgent->resume(&error); 326 debuggerAgent->resume(&error);
326 } 327 }
327 } 328 }
328 329
329 #endif 330 #endif
330 331
331 } // namespace WebCore 332 } // namespace WebCore
332 333
333 #endif // ENABLE(INSPECTOR) 334 #endif // ENABLE(INSPECTOR)
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/InspectorController.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698