Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(937)

Unified Diff: content/plugin/webplugin_delegate_stub.cc

Issue 7812020: Moved the following IPC messages used by the chrome NPAPI plugin installer out of content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/plugin/webplugin_delegate_stub.h ('k') | content/plugin/webplugin_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/plugin/webplugin_delegate_stub.cc
===================================================================
--- content/plugin/webplugin_delegate_stub.cc (revision 98657)
+++ content/plugin/webplugin_delegate_stub.cc (working copy)
@@ -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 @@
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 @@
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 @@
delegate_->DidManualLoadFail();
}
-void WebPluginDelegateStub::OnInstallMissingPlugin() {
- delegate_->InstallMissingPlugin();
-}
-
void WebPluginDelegateStub::OnHandleURLRequestReply(
unsigned long resource_id, const GURL& url, int notify_id) {
WebPluginResourceClient* resource_client =
« no previous file with comments | « content/plugin/webplugin_delegate_stub.h ('k') | content/plugin/webplugin_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698