summaryrefslogtreecommitdiffstats
path: root/content/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'content/plugin')
-rw-r--r--content/plugin/webplugin_delegate_stub.cc24
-rw-r--r--content/plugin/webplugin_delegate_stub.h1
-rw-r--r--content/plugin/webplugin_proxy.cc4
-rw-r--r--content/plugin/webplugin_proxy.h1
4 files changed, 17 insertions, 13 deletions
diff --git a/content/plugin/webplugin_delegate_stub.cc b/content/plugin/webplugin_delegate_stub.cc
index 87e8fda..824cd47 100644
--- a/content/plugin/webplugin_delegate_stub.cc
+++ b/content/plugin/webplugin_delegate_stub.cc
@@ -7,7 +7,9 @@
#include "build/build_config.h"
#include "base/command_line.h"
+#include "base/string_number_conversions.h"
#include "content/common/content_client.h"
+#include "content/common/content_constants.h"
#include "content/common/content_switches.h"
#include "content/common/plugin_messages.h"
#include "content/plugin/npobject_stub.h"
@@ -122,7 +124,6 @@ bool WebPluginDelegateStub::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginMsg_DidFinishManualLoading,
OnDidFinishManualLoading)
IPC_MESSAGE_HANDLER(PluginMsg_DidManualLoadFail, OnDidManualLoadFail)
- IPC_MESSAGE_HANDLER(PluginMsg_InstallMissingPlugin, OnInstallMissingPlugin)
IPC_MESSAGE_HANDLER(PluginMsg_HandleURLRequestReply,
OnHandleURLRequestReply)
IPC_MESSAGE_HANDLER(PluginMsg_HTTPRangeRequestReply,
@@ -179,9 +180,22 @@ void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params,
path, mime_type_, parent);
if (delegate_) {
webplugin_->set_delegate(delegate_);
+ std::vector<std::string> arg_names = params.arg_names;
+ std::vector<std::string> arg_values = params.arg_values;
+
+ if (path.value() == webkit::npapi::kDefaultPluginLibraryName) {
+ // Add the renderer process id and Render view routing id to the list of
+ // parameters passed to the plugin.
+ arg_names.push_back(content::kDefaultPluginRenderViewId);
+ arg_values.push_back(base::IntToString(
+ params.host_render_view_routing_id));
+
+ arg_names.push_back(content::kDefaultPluginRenderProcessId);
+ arg_values.push_back(base::IntToString(channel_->renderer_id()));
+ }
*result = delegate_->Initialize(params.url,
- params.arg_names,
- params.arg_values,
+ arg_names,
+ arg_values,
webplugin_,
params.load_manually);
}
@@ -363,10 +377,6 @@ void WebPluginDelegateStub::OnDidManualLoadFail() {
delegate_->DidManualLoadFail();
}
-void WebPluginDelegateStub::OnInstallMissingPlugin() {
- delegate_->InstallMissingPlugin();
-}
-
void WebPluginDelegateStub::OnHandleURLRequestReply(
unsigned long resource_id, const GURL& url, int notify_id) {
WebPluginResourceClient* resource_client =
diff --git a/content/plugin/webplugin_delegate_stub.h b/content/plugin/webplugin_delegate_stub.h
index 3c4610a..4a12b9a 100644
--- a/content/plugin/webplugin_delegate_stub.h
+++ b/content/plugin/webplugin_delegate_stub.h
@@ -97,7 +97,6 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
void OnDidReceiveManualData(const std::vector<char>& buffer);
void OnDidFinishManualLoading();
void OnDidManualLoadFail();
- void OnInstallMissingPlugin();
void OnHandleURLRequestReply(unsigned long resource_id,
const GURL& url,
int notify_id);
diff --git a/content/plugin/webplugin_proxy.cc b/content/plugin/webplugin_proxy.cc
index df76e8e..c01bc55 100644
--- a/content/plugin/webplugin_proxy.cc
+++ b/content/plugin/webplugin_proxy.cc
@@ -260,10 +260,6 @@ std::string WebPluginProxy::GetCookies(const GURL& url,
return cookies;
}
-void WebPluginProxy::OnMissingPluginStatus(int status) {
- Send(new PluginHostMsg_MissingPluginStatus(route_id_, status));
-}
-
WebPluginResourceClient* WebPluginProxy::GetResourceClient(int id) {
ResourceClientMap::iterator iterator = resource_clients_.find(id);
// The IPC messages which deal with streams are now asynchronous. It is
diff --git a/content/plugin/webplugin_proxy.h b/content/plugin/webplugin_proxy.h
index df1b880..b6e3175 100644
--- a/content/plugin/webplugin_proxy.h
+++ b/content/plugin/webplugin_proxy.h
@@ -80,7 +80,6 @@ class WebPluginProxy : public webkit::npapi::WebPlugin {
virtual std::string GetCookies(const GURL& url,
const GURL& first_party_for_cookies);
- virtual void OnMissingPluginStatus(int status);
// class-specific methods
// Returns a WebPluginResourceClient object given its id, or NULL if no