diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 00:46:33 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-19 00:46:33 +0000 |
commit | 46b0d4aacbf25108badc143e09f91064fc0b0472 (patch) | |
tree | d1ec74ba60c5c7ae6fd683ad7b685095434e6f03 /chrome/plugin | |
parent | 08ae5f310a475f73807df520fa0b50cf7138c4f5 (diff) | |
download | chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.zip chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.tar.gz chromium_src-46b0d4aacbf25108badc143e09f91064fc0b0472.tar.bz2 |
Add a CreateBridge method to the ChildThread.
The intent is to allow unit-tests that use render view
to override ChildThread::CreateBridge() to provide their
own resource loading.
This is used by the upcoming translate unit-test.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/503032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/chrome_plugin_host.cc | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc index 4e3a8cb..ab459f4 100644 --- a/chrome/plugin/chrome_plugin_host.cc +++ b/chrome/plugin/chrome_plugin_host.cc @@ -151,21 +151,24 @@ class PluginRequestHandlerProxy } CPError Start(int renderer_id, int render_view_id) { + webkit_glue::ResourceLoaderBridge::RequestInfo request_info; + request_info.method = cprequest_->method; + request_info.url = GURL(cprequest_->url); + request_info.first_party_for_cookies = + GURL(cprequest_->url); // TODO(jackson): policy url? + request_info.referrer = GURL(); // TODO(mpcomplete): referrer? + request_info.frame_origin = "null"; + request_info.main_frame_origin = "null"; + request_info.headers = extra_headers_; + request_info.load_flags = load_flags_; + request_info.requestor_pid = base::GetCurrentProcId(); + request_info.request_type = ResourceType::OBJECT; + request_info.request_context = cprequest_->context; + request_info.appcache_host_id = appcache::kNoHostId; + request_info.routing_id = MSG_ROUTING_CONTROL; bridge_.reset( PluginThread::current()->resource_dispatcher()->CreateBridge( - cprequest_->method, - GURL(cprequest_->url), - GURL(cprequest_->url), // TODO(jackson): policy url? - GURL(), // TODO(mpcomplete): referrer? - "null", // frame_origin - "null", // main_frame_origin - extra_headers_, - load_flags_, - base::GetCurrentProcId(), - ResourceType::OBJECT, - cprequest_->context, - appcache::kNoHostId, - MSG_ROUTING_CONTROL, + request_info, renderer_id, render_view_id)); if (!bridge_.get()) |