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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 10412056: Browser Plugin: Remove MapInstance from BrowserPluginHost + More cross-process navigation work (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed commented out code Created 8 years, 7 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
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 9f8a9b1e13a80588f1f328b5fd74099e9d7179da..fc636df796a46937cd2df6f10d918d18fdee6012 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -16,6 +16,7 @@
#include "content/public/common/url_constants.h"
#include "content/renderer/render_view_impl.h"
#include "ipc/ipc_channel_handle.h"
+#include "ppapi/proxy/host_dispatcher.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h"
@@ -149,12 +150,12 @@ void BrowserPlugin::Replace(
if (plugin_)
plugin_->instance()->BindGraphics(plugin_->instance()->pp_instance(), 0);
- // Inform the browser process of the association between the browser plugin's
- // instance ID and the pepper channel's PP_Instance identifier.
- render_view()->Send(new BrowserPluginHostMsg_MapInstance(
- render_view()->GetRoutingID(),
- id_,
- new_plugin->instance()->pp_instance()));
+ PP_Instance instance = new_plugin->instance()->pp_instance();
+ ppapi::proxy::HostDispatcher* dispatcher =
+ ppapi::proxy::HostDispatcher::GetForInstance(instance);
+ DCHECK(dispatcher);
+ dispatcher->Send(new BrowserPluginMsg_GuestReady(instance, id_));
+
// TODO(fsamuel): We should delay the swapping out of the current plugin
// until after the guest's WebGraphicsContext3D has been initialized. That
// way, we immediately have something to render onto the screen.

Powered by Google App Engine
This is Rietveld 408576698