diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 08:04:18 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 08:04:18 +0000 |
commit | f94ead7d53296e14f1254ad1cdd4b73f3d6b9130 (patch) | |
tree | 9a69ebed813f36d6f410f5a99193c40edd6aac07 /chrome/browser/worker_host | |
parent | e796881505363ef53a4082bb0450cd169f1d8d44 (diff) | |
download | chromium_src-f94ead7d53296e14f1254ad1cdd4b73f3d6b9130.zip chromium_src-f94ead7d53296e14f1254ad1cdd4b73f3d6b9130.tar.gz chromium_src-f94ead7d53296e14f1254ad1cdd4b73f3d6b9130.tar.bz2 |
Revert "Added beginnings of browser-process support for shared workers."
This reverts commit 31077.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/worker_host')
-rw-r--r-- | chrome/browser/worker_host/worker_process_host.cc | 21 | ||||
-rw-r--r-- | chrome/browser/worker_host/worker_process_host.h | 10 | ||||
-rw-r--r-- | chrome/browser/worker_host/worker_service.cc | 16 | ||||
-rw-r--r-- | chrome/browser/worker_host/worker_service.h | 14 |
4 files changed, 24 insertions, 37 deletions
diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc index 02e3cc6..eb6d2fe 100644 --- a/chrome/browser/worker_host/worker_process_host.cc +++ b/chrome/browser/worker_host/worker_process_host.cc @@ -139,10 +139,8 @@ void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { id(), instance.url); instances_.push_back(instance); - Send(new WorkerProcessMsg_CreateWorker(instance.url, - instance.is_shared, - instance.name, - instance.worker_route_id)); + Send(new WorkerProcessMsg_CreateWorker( + instance.url, instance.worker_route_id)); UpdateTitle(); instances_.back().sender->Send( @@ -177,7 +175,8 @@ void WorkerProcessHost::OnMessageReceived(const IPC::Message& message) { if (!handled) { handled = true; IPC_BEGIN_MESSAGE_MAP_EX(WorkerProcessHost, message, msg_is_ok) - IPC_MESSAGE_HANDLER(ViewHostMsg_CreateWorker, OnCreateWorker) + IPC_MESSAGE_HANDLER(ViewHostMsg_CreateDedicatedWorker, + OnCreateDedicatedWorker) IPC_MESSAGE_HANDLER(ViewHostMsg_CancelCreateDedicatedWorker, OnCancelCreateDedicatedWorker) IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardToWorker, @@ -322,15 +321,13 @@ void WorkerProcessHost::UpdateTitle() { set_name(ASCIIToWide(display_title)); } -void WorkerProcessHost::OnCreateWorker(const GURL& url, - bool is_shared, - const string16& name, - int render_view_route_id, - int* route_id) { +void WorkerProcessHost::OnCreateDedicatedWorker(const GURL& url, + int render_view_route_id, + int* route_id) { DCHECK(instances_.size() == 1); // Only called when one process per worker. *route_id = WorkerService::GetInstance()->next_worker_route_id(); - WorkerService::GetInstance()->CreateWorker( - url, is_shared, name, instances_.front().renderer_id, + WorkerService::GetInstance()->CreateDedicatedWorker( + url, instances_.front().renderer_id, instances_.front().render_view_route_id, this, id(), *route_id); } diff --git a/chrome/browser/worker_host/worker_process_host.h b/chrome/browser/worker_host/worker_process_host.h index 1fae373..65f4999 100644 --- a/chrome/browser/worker_host/worker_process_host.h +++ b/chrome/browser/worker_host/worker_process_host.h @@ -19,8 +19,6 @@ class WorkerProcessHost : public ChildProcessHost { // between the renderer and worker processes. struct WorkerInstance { GURL url; - bool is_shared; - string16 name; int renderer_id; int render_view_route_id; int worker_route_id; @@ -75,11 +73,9 @@ class WorkerProcessHost : public ChildProcessHost { // Updates the title shown in the task manager. void UpdateTitle(); - void OnCreateWorker(const GURL& url, - bool is_shared, - const string16& name, - int render_view_route_id, - int* route_id); + void OnCreateDedicatedWorker(const GURL& url, + int render_view_route_id, + int* route_id); void OnCancelCreateDedicatedWorker(int route_id); void OnForwardToWorker(const IPC::Message& message); diff --git a/chrome/browser/worker_host/worker_service.cc b/chrome/browser/worker_host/worker_service.cc index 334917f..a54bb2a 100644 --- a/chrome/browser/worker_host/worker_service.cc +++ b/chrome/browser/worker_host/worker_service.cc @@ -44,28 +44,24 @@ void WorkerService::Initialize(ResourceDispatcherHost* rdh) { WorkerService::~WorkerService() { } -bool WorkerService::CreateWorker(const GURL &url, - bool is_shared, - const string16& name, - int renderer_id, - int render_view_route_id, - IPC::Message::Sender* sender, - int sender_id, - int sender_route_id) { +bool WorkerService::CreateDedicatedWorker(const GURL &url, + int renderer_id, + int render_view_route_id, + IPC::Message::Sender* sender, + int sender_id, + int sender_route_id) { // Generate a unique route id for the browser-worker communication that's // unique among all worker processes. That way when the worker process sends // a wrapped IPC message through us, we know which WorkerProcessHost to give // it to. WorkerProcessHost::WorkerInstance instance; instance.url = url; - instance.name = name; instance.renderer_id = renderer_id; instance.render_view_route_id = render_view_route_id; instance.worker_route_id = next_worker_route_id(); instance.sender = sender; instance.sender_id = sender_id; instance.sender_route_id = sender_route_id; - instance.is_shared = is_shared; WorkerProcessHost* worker = NULL; if (CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/chrome/browser/worker_host/worker_service.h b/chrome/browser/worker_host/worker_service.h index 40267aa..0bd6f58 100644 --- a/chrome/browser/worker_host/worker_service.h +++ b/chrome/browser/worker_host/worker_service.h @@ -26,14 +26,12 @@ class WorkerService : public NotificationObserver { void Initialize(ResourceDispatcherHost* rdh); // Creates a dedicated worker. Returns true on success. - bool CreateWorker(const GURL &url, - bool is_shared, - const string16& name, - int renderer_pid, - int render_view_route_id, - IPC::Message::Sender* sender, - int sender_id, - int sender_route_id); + bool CreateDedicatedWorker(const GURL &url, + int renderer_pid, + int render_view_route_id, + IPC::Message::Sender* sender, + int sender_id, + int sender_route_id); // Cancel creation of a dedicated worker that hasn't started yet. void CancelCreateDedicatedWorker(int sender_id, int sender_route_id); |