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

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

Issue 9968097: Browser Plugin: Renderer-side changes (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary include and forward declaration. Created 8 years, 8 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_placeholder.cc
diff --git a/content/renderer/browser_plugin/browser_plugin_placeholder.cc b/content/renderer/browser_plugin/browser_plugin_placeholder.cc
index 21ac8ee27680cfc793af8f08d856ce5f048d4ee2..64ed09a62f9d8b28306d4d147805fd39ecee725e 100644
--- a/content/renderer/browser_plugin/browser_plugin_placeholder.cc
+++ b/content/renderer/browser_plugin/browser_plugin_placeholder.cc
@@ -12,8 +12,9 @@
#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/values.h"
-#include "content/common/view_messages.h"
+#include "content/common/browser_plugin_messages.h"
#include "content/public/renderer/render_view.h"
+#include "content/renderer/render_view_impl.h"
#include "ipc/ipc_channel_handle.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
@@ -67,8 +68,8 @@ BrowserPluginPlaceholder::BrowserPluginPlaceholder(
// By default we navigate to google.com
GetPluginParameters(0, 0, "http://www.google.com/");
- // TODO(fsamuel): Request a browser plugin instance from the
- // browser process.
+ render_view->Send(new BrowserPluginHostMsg_OpenChannel(
+ render_view->GetRoutingID(), GetID(), frame->identifier(), src_, size_));
}
BrowserPluginPlaceholder::~BrowserPluginPlaceholder() {
@@ -120,10 +121,12 @@ void BrowserPluginPlaceholder::GetPluginParameters(
void BrowserPluginPlaceholder::GuestReady(
base::ProcessHandle process_handle,
const IPC::ChannelHandle& channel_handle) {
- // TODO(fsamuel): Once the guest renderer is ready,
- // it will inform the host renderer and the BrowserPluginPlaceholder
- // can swap itself out with the guest.
- NOTIMPLEMENTED();
+ WebKit::WebPlugin* new_plugin =
+ static_cast<RenderViewImpl*>(
piman 2012/04/06 23:19:26 This cast makes me nervous. Either expose CreateBr
Fady Samuel 2012/04/11 22:06:34 Done. BrowserPluginPlaceholder now takes in a Rend
+ render_view())->CreateBrowserPlugin(process_handle,
+ channel_handle,
+ plugin_params());
+ LoadGuest(new_plugin);
}
void BrowserPluginPlaceholder::LoadGuest(WebKit::WebPlugin* new_plugin) {

Powered by Google App Engine
This is Rietveld 408576698