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

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

Issue 411283002: Remove disable-embedded-shared-worker flag and shared worker process related codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 5 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_manager.h" 5 #include "content/browser/devtools/embedded_worker_devtools_manager.h"
6 6
7 #include "content/browser/devtools/devtools_manager_impl.h" 7 #include "content/browser/devtools/devtools_manager_impl.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/devtools/ipc_devtools_agent_host.h" 10 #include "content/browser/devtools/ipc_devtools_agent_host.h"
11 #include "content/browser/shared_worker/shared_worker_instance.h" 11 #include "content/browser/shared_worker/shared_worker_instance.h"
12 #include "content/common/devtools_messages.h" 12 #include "content/common/devtools_messages.h"
13 #include "content/public/browser/browser_thread.h" 13 #include "content/public/browser/browser_thread.h"
14 #include "content/public/browser/render_process_host.h" 14 #include "content/public/browser/render_process_host.h"
15 #include "content/public/browser/worker_service.h" 15 #include "content/public/browser/worker_service.h"
16 #include "ipc/ipc_listener.h" 16 #include "ipc/ipc_listener.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 // Called on the UI thread.
21 // static
22 scoped_refptr<DevToolsAgentHost> DevToolsAgentHost::GetForWorker(
23 int worker_process_id,
24 int worker_route_id) {
25 return EmbeddedWorkerDevToolsManager::GetInstance()
26 ->GetDevToolsAgentHostForWorker(worker_process_id, worker_route_id);
27 }
28
20 namespace { 29 namespace {
21 30
22 bool SendMessageToWorker( 31 bool SendMessageToWorker(
23 const EmbeddedWorkerDevToolsManager::WorkerId& worker_id, 32 const EmbeddedWorkerDevToolsManager::WorkerId& worker_id,
24 IPC::Message* message) { 33 IPC::Message* message) {
25 RenderProcessHost* host = RenderProcessHost::FromID(worker_id.first); 34 RenderProcessHost* host = RenderProcessHost::FromID(worker_id.first);
26 if (!host) { 35 if (!host) {
27 delete message; 36 delete message;
28 return false; 37 return false;
29 } 38 }
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 scoped_ptr<WorkerInfo> info = workers_.take_and_erase(it); 379 scoped_ptr<WorkerInfo> info = workers_.take_and_erase(it);
371 info->set_state(WORKER_PAUSED_FOR_REATTACH); 380 info->set_state(WORKER_PAUSED_FOR_REATTACH);
372 workers_.set(id, info.Pass()); 381 workers_.set(id, info.Pass());
373 } 382 }
374 383
375 void EmbeddedWorkerDevToolsManager::ResetForTesting() { 384 void EmbeddedWorkerDevToolsManager::ResetForTesting() {
376 workers_.clear(); 385 workers_.clear();
377 } 386 }
378 387
379 } // namespace content 388 } // namespace content
OLDNEW
« no previous file with comments | « content/app/content_main_runner.cc ('k') | content/browser/devtools/embedded_worker_devtools_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698