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

Side by Side Diff: content/browser/debugger/worker_devtools_manager.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debugger/worker_devtools_manager.h" 5 #include "content/browser/debugger/worker_devtools_manager.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 9
10 #include "base/tuple.h" 10 #include "base/tuple.h"
11 #include "content/browser/debugger/devtools_agent_host.h" 11 #include "content/browser/debugger/devtools_agent_host.h"
12 #include "content/browser/debugger/devtools_manager.h" 12 #include "content/browser/debugger/devtools_manager.h"
13 #include "content/browser/debugger/worker_devtools_message_filter.h" 13 #include "content/browser/debugger/worker_devtools_message_filter.h"
14 #include "content/browser/worker_host/worker_process_host.h" 14 #include "content/browser/worker_host/worker_process_host.h"
15 #include "content/browser/worker_host/worker_service.h" 15 #include "content/browser/worker_host/worker_service.h"
16 #include "content/common/devtools_messages.h" 16 #include "content/common/devtools_messages.h"
17 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
18 #include "content/public/browser/notification_observer.h" 18 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 19 #include "content/public/browser/notification_registrar.h"
20 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
21 #include "content/public/browser/notification_types.h" 21 #include "content/public/browser/notification_types.h"
22 22
23 using content::BrowserThread;
24
23 class WorkerDevToolsManager::AgentHosts 25 class WorkerDevToolsManager::AgentHosts
24 : private content::NotificationObserver { 26 : private content::NotificationObserver {
25 public: 27 public:
26 static void Add(WorkerId id, WorkerDevToolsAgentHost* host) { 28 static void Add(WorkerId id, WorkerDevToolsAgentHost* host) {
27 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
28 if (!instance_) 30 if (!instance_)
29 instance_ = new AgentHosts(); 31 instance_ = new AgentHosts();
30 instance_->map_[id] = host; 32 instance_->map_[id] = host;
31 } 33 }
32 static void Remove(WorkerId id) { 34 static void Remove(WorkerId id) {
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 if (host) 469 if (host)
468 host->WorkerDestroyed(); 470 host->WorkerDestroyed();
469 } 471 }
470 472
471 // static 473 // static
472 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) { 474 void WorkerDevToolsManager::SendResumeToWorker(const WorkerId& id) {
473 if (WorkerProcessHost* process = FindWorkerProcess(id.first)) 475 if (WorkerProcessHost* process = FindWorkerProcess(id.first))
474 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second)); 476 process->Send(new DevToolsAgentMsg_ResumeWorkerContext(id.second));
475 } 477 }
476 478
OLDNEW
« no previous file with comments | « content/browser/debugger/devtools_netlog_observer.cc ('k') | content/browser/device_orientation/message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698