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

Unified Diff: content/browser/debugger/worker_devtools_manager.cc

Issue 9150017: Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix?! Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/debugger/worker_devtools_manager.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/debugger/worker_devtools_manager.cc
===================================================================
--- content/browser/debugger/worker_devtools_manager.cc (revision 118420)
+++ content/browser/debugger/worker_devtools_manager.cc (working copy)
@@ -15,6 +15,7 @@
#include "content/browser/worker_host/worker_service_impl.h"
#include "content/common/devtools_messages.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/child_process_data.h"
#include "content/public/browser/devtools_agent_host_registry.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -292,8 +293,7 @@
instance.resource_context())) {
worker->Send(new DevToolsAgentMsg_PauseWorkerContextOnStart(
instance.worker_route_id()));
- WorkerId new_worker_id(
- worker->data().id, instance.worker_route_id());
+ WorkerId new_worker_id(worker->GetData().id, instance.worker_route_id());
paused_workers_[new_worker_id] = it->old_worker_id;
terminated_workers_.erase(it);
return;
@@ -305,12 +305,12 @@
WorkerProcessHost* worker,
int worker_route_id) {
InspectedWorkersList::iterator it = FindInspectedWorker(
- worker->data().id,
+ worker->GetData().id,
worker_route_id);
if (it == inspected_workers_.end())
return;
- WorkerId worker_id(worker->data().id, worker_route_id);
+ WorkerId worker_id(worker->GetData().id, worker_route_id);
terminated_workers_.push_back(TerminatedInspectedWorker(
worker_id,
it->worker_url,
@@ -323,7 +323,7 @@
void WorkerDevToolsManager::WorkerContextStarted(WorkerProcessHost* process,
int worker_route_id) {
- WorkerId new_worker_id(process->data().id, worker_route_id);
+ WorkerId new_worker_id(process->GetData().id, worker_route_id);
PausedWorkers::iterator it = paused_workers_.find(new_worker_id);
if (it == paused_workers_.end())
return;
@@ -362,7 +362,7 @@
int host_id, int route_id) {
InspectedWorkersList::iterator it = inspected_workers_.begin();
while (it != inspected_workers_.end()) {
- if (it->host->data().id == host_id && it->route_id == route_id)
+ if (it->host->GetData().id == host_id && it->route_id == route_id)
break;
++it;
}
@@ -370,10 +370,9 @@
}
static WorkerProcessHost* FindWorkerProcess(int worker_process_id) {
- BrowserChildProcessHost::Iterator iter(content::PROCESS_TYPE_WORKER);
- for (; !iter.Done(); ++iter) {
- if (iter->data().id == worker_process_id)
- return static_cast<WorkerProcessHost*>(*iter);
+ for (WorkerProcessHostIterator iter; !iter.Done(); ++iter) {
+ if (iter.GetData().id == worker_process_id)
+ return *iter;
}
return NULL;
}
« no previous file with comments | « content/browser/debugger/worker_devtools_manager.h ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698