diff options
author | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 20:34:25 +0000 |
---|---|---|
committer | atwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 20:34:25 +0000 |
commit | 100a0095898381f0efb3d441a7f533ed96923042 (patch) | |
tree | e9dd922e4e4a20f2dca067e794e5b489b9bf2d2d /chrome/renderer/webworker_base.cc | |
parent | 6d2721fbdbddd4d35616d9b7774945a3cf42375b (diff) | |
download | chromium_src-100a0095898381f0efb3d441a7f533ed96923042.zip chromium_src-100a0095898381f0efb3d441a7f533ed96923042.tar.gz chromium_src-100a0095898381f0efb3d441a7f533ed96923042.tar.bz2 |
Refactored code to allow associating workers with multiple renderers.
SharedWorkers now gracefully handle http auth requests after their
initial window has closed.
BUG=27660
TEST=WorkerHttpAuth,SharedWorkerHttpAuth uitests
Review URL: http://codereview.chromium.org/509016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webworker_base.cc')
-rw-r--r-- | chrome/renderer/webworker_base.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/renderer/webworker_base.cc b/chrome/renderer/webworker_base.cc index e32026c..e78ef64 100644 --- a/chrome/renderer/webworker_base.cc +++ b/chrome/renderer/webworker_base.cc @@ -19,11 +19,13 @@ using WebKit::WebWorkerClient; WebWorkerBase::WebWorkerBase( ChildThread* child_thread, + unsigned long long document_id, int route_id, int render_view_route_id) : route_id_(route_id), render_view_route_id_(render_view_route_id), - child_thread_(child_thread) { + child_thread_(child_thread), + document_id_(document_id) { if (route_id_ != MSG_ROUTING_NONE) child_thread_->AddRoute(route_id_, this); } @@ -54,8 +56,14 @@ void WebWorkerBase::CreateWorkerContext(const GURL& script_url, const string16& user_agent, const string16& source_code) { DCHECK(route_id_ == MSG_ROUTING_NONE); + ViewHostMsg_CreateWorker_Params params; + params.url = script_url; + params.is_shared = is_shared; + params.name = name; + params.document_id = document_id_; + params.render_view_route_id = render_view_route_id_; IPC::Message* create_message = new ViewHostMsg_CreateWorker( - script_url, is_shared, name, render_view_route_id_, &route_id_); + params, &route_id_); child_thread_->Send(create_message); if (route_id_ == MSG_ROUTING_NONE) return; |