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

Side by Side Diff: content/browser/devtools/embedded_worker_devtools_agent_host.cc

Issue 661423002: DevTools: Clean-up service/shared workers code after switching to main thread debugging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed some more code Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/devtools/embedded_worker_devtools_agent_host.h" 5 #include "content/browser/devtools/embedded_worker_devtools_agent_host.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/devtools/devtools_protocol.h" 8 #include "content/browser/devtools/devtools_protocol.h"
9 #include "content/browser/devtools/devtools_protocol_constants.h" 9 #include "content/browser/devtools/devtools_protocol_constants.h"
10 #include "content/browser/service_worker/service_worker_context_core.h" 10 #include "content/browser/service_worker/service_worker_context_core.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 RenderProcessHost* rph = RenderProcessHost::FromID(worker_id_.first); 152 RenderProcessHost* rph = RenderProcessHost::FromID(worker_id_.first);
153 Inspect(rph->GetBrowserContext()); 153 Inspect(rph->GetBrowserContext());
154 } else if (state_ == WORKER_PAUSED_FOR_REATTACH) { 154 } else if (state_ == WORKER_PAUSED_FOR_REATTACH) {
155 DCHECK(IsAttached()); 155 DCHECK(IsAttached());
156 state_ = WORKER_INSPECTED; 156 state_ = WORKER_INSPECTED;
157 AttachToWorker(); 157 AttachToWorker();
158 Reattach(saved_agent_state_); 158 Reattach(saved_agent_state_);
159 } 159 }
160 } 160 }
161 161
162 void EmbeddedWorkerDevToolsAgentHost::WorkerContextStarted() {
163 }
164
165 void EmbeddedWorkerDevToolsAgentHost::WorkerRestarted(WorkerId worker_id) { 162 void EmbeddedWorkerDevToolsAgentHost::WorkerRestarted(WorkerId worker_id) {
166 DCHECK_EQ(WORKER_TERMINATED, state_); 163 DCHECK_EQ(WORKER_TERMINATED, state_);
167 state_ = IsAttached() ? WORKER_PAUSED_FOR_REATTACH : WORKER_UNINSPECTED; 164 state_ = IsAttached() ? WORKER_PAUSED_FOR_REATTACH : WORKER_UNINSPECTED;
168 worker_id_ = worker_id; 165 worker_id_ = worker_id;
169 WorkerCreated(); 166 WorkerCreated();
170 } 167 }
171 168
172 void EmbeddedWorkerDevToolsAgentHost::WorkerDestroyed() { 169 void EmbeddedWorkerDevToolsAgentHost::WorkerDestroyed() {
173 DCHECK_NE(WORKER_TERMINATED, state_); 170 DCHECK_NE(WORKER_TERMINATED, state_);
174 if (state_ == WORKER_INSPECTED) { 171 if (state_ == WORKER_INSPECTED) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 223
227 ProcessChunkedMessageFromAgent(message, total_size); 224 ProcessChunkedMessageFromAgent(message, total_size);
228 } 225 }
229 226
230 void EmbeddedWorkerDevToolsAgentHost::OnSaveAgentRuntimeState( 227 void EmbeddedWorkerDevToolsAgentHost::OnSaveAgentRuntimeState(
231 const std::string& state) { 228 const std::string& state) {
232 saved_agent_state_ = state; 229 saved_agent_state_ = state;
233 } 230 }
234 231
235 } // namespace content 232 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698