Index: content/child/npapi/webplugin_delegate_impl.cc |
=================================================================== |
--- content/child/npapi/webplugin_delegate_impl.cc (revision 222566) |
+++ content/child/npapi/webplugin_delegate_impl.cc (working copy) |
@@ -14,6 +14,7 @@ |
#include "content/child/npapi/plugin_instance.h" |
#include "content/child/npapi/plugin_lib.h" |
#include "content/child/npapi/plugin_stream_url.h" |
+#include "content/child/npapi/plugin_url_fetcher.h" |
#include "third_party/WebKit/public/web/WebInputEvent.h" |
#include "webkit/glue/webkit_glue.h" |
@@ -23,6 +24,7 @@ |
namespace content { |
WebPluginDelegateImpl* WebPluginDelegateImpl::Create( |
+ WebPlugin* plugin, |
const base::FilePath& filename, |
const std::string& mime_type) { |
scoped_refptr<PluginLib> plugin_lib(PluginLib::CreatePluginLib(filename)); |
@@ -34,7 +36,7 @@ |
return NULL; |
scoped_refptr<PluginInstance> instance(plugin_lib->CreateInstance(mime_type)); |
- return new WebPluginDelegateImpl(instance.get()); |
+ return new WebPluginDelegateImpl(plugin, instance.get()); |
} |
void WebPluginDelegateImpl::PluginDestroyed() { |
@@ -49,10 +51,7 @@ |
const GURL& url, |
const std::vector<std::string>& arg_names, |
const std::vector<std::string>& arg_values, |
- WebPlugin* plugin, |
bool load_manually) { |
- plugin_ = plugin; |
- |
instance_->set_web_plugin(plugin_); |
if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) { |
PluginLib* plugin_lib = instance()->plugin_lib(); |
@@ -301,4 +300,26 @@ |
return resource_client; |
} |
+void WebPluginDelegateImpl::FetchURL(unsigned long resource_id, |
+ int notify_id, |
+ const GURL& url, |
+ const GURL& first_party_for_cookies, |
+ const std::string& method, |
+ const std::string& post_data, |
+ const GURL& referrer, |
+ bool notify_redirects, |
+ bool is_plugin_src_load, |
+ int origin_pid, |
+ int render_view_id) { |
+ // TODO(jam): once we switch over to resource loading always happening in this |
+ // code path, remove WebPluginResourceClient abstraction. |
+ PluginStreamUrl* plugin_stream = instance()->CreateStream( |
+ resource_id, url, std::string(), notify_id); |
+ |
+ plugin_stream->SetPluginURLFetcher(new PluginURLFetcher( |
+ plugin_stream, url, first_party_for_cookies, method, post_data, |
+ referrer, notify_redirects, is_plugin_src_load, origin_pid, |
+ render_view_id, resource_id)); |
+} |
+ |
} // namespace content |