diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 06:29:08 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-05 06:29:08 +0000 |
commit | bec1ed112990143fe30b6cae4624fdde3015efce (patch) | |
tree | 24ca36e4bc748f6a872decfaccd7f41cac60c4b3 /chrome/browser/worker_host/worker_service.cc | |
parent | c38a0c74b4a29e6eecb99babf7c98045f05c1c56 (diff) | |
download | chromium_src-bec1ed112990143fe30b6cae4624fdde3015efce.zip chromium_src-bec1ed112990143fe30b6cae4624fdde3015efce.tar.gz chromium_src-bec1ed112990143fe30b6cae4624fdde3015efce.tar.bz2 |
Added beginnings of browser-process support for shared workers.
Refactored WebWorkerClientProxy into two classes - WebWorkerDispatcher which dispatches incoming IPCs for the worker, and WebWorkerClientProxy, which handles outgoing API calls from WebWorkerImpl. This allows WebWorkerClientProxy to be reused by WebSharedWorkerDispatcher.
BUG=26233
TEST=none (will enable layout tests when basic functionality available)
Review URL: http://codereview.chromium.org/351004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/worker_host/worker_service.cc')
-rw-r--r-- | chrome/browser/worker_host/worker_service.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/worker_host/worker_service.cc b/chrome/browser/worker_host/worker_service.cc index a54bb2a..334917f 100644 --- a/chrome/browser/worker_host/worker_service.cc +++ b/chrome/browser/worker_host/worker_service.cc @@ -44,24 +44,28 @@ void WorkerService::Initialize(ResourceDispatcherHost* rdh) { WorkerService::~WorkerService() { } -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) { +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) { // 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( |