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

Unified Diff: chrome/renderer/plugins/chrome_plugin_placeholder.cc

Issue 69953006: Bind plugin placeholder directly to v8 instead of over CppBoundClass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 1 month 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: chrome/renderer/plugins/chrome_plugin_placeholder.cc
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.cc b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
index 7b7506dcdbaf2404a30b8ca5ff4d629b87d39e91..0aba7d85ad9c4aa83cc6d3b19d91b0ec3755dc57 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.cc
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.cc
@@ -35,8 +35,6 @@ using blink::WebNode;
using blink::WebPlugin;
using blink::WebPluginContainer;
using blink::WebPluginParams;
-using webkit_glue::CppArgumentList;
-using webkit_glue::CppVariant;
namespace {
const plugins::PluginPlaceholder* g_last_active_menu = NULL;
@@ -64,6 +62,7 @@ ChromePluginPlaceholder::ChromePluginPlaceholder(
has_host_(false),
context_menu_request_id_(0) {
RenderThread::Get()->AddObserver(this);
+ RegisterCallback("openAboutPlugins");
}
ChromePluginPlaceholder::~ChromePluginPlaceholder() {
@@ -217,13 +216,6 @@ void ChromePluginPlaceholder::OnLoadBlockedPlugins(
plugins::PluginPlaceholder::OnLoadBlockedPlugins(identifier);
}
-void ChromePluginPlaceholder::OpenAboutPluginsCallback(
- const CppArgumentList& args,
- CppVariant* result) {
- RenderThread::Get()->Send(
- new ChromeViewHostMsg_OpenAboutPlugins(routing_id()));
-}
-
void ChromePluginPlaceholder::OnSetIsPrerendering(bool is_prerendering) {
plugins::PluginPlaceholder::OnSetIsPrerendering(is_prerendering);
}
@@ -352,9 +344,8 @@ void ChromePluginPlaceholder::ShowContextMenu(const WebMouseEvent& event) {
g_last_active_menu = this;
}
-void ChromePluginPlaceholder::BindWebFrame(blink::WebFrame* frame) {
- plugins::PluginPlaceholder::BindWebFrame(frame);
- BindCallback("openAboutPlugins",
- base::Bind(&ChromePluginPlaceholder::OpenAboutPluginsCallback,
- base::Unretained(this)));
+void ChromePluginPlaceholder::Observe(const std::string& callback) {
+ DCHECK_EQ("openAboutPlugins", callback);
+ RenderThread::Get()->Send(
+ new ChromeViewHostMsg_OpenAboutPlugins(routing_id()));
}

Powered by Google App Engine
This is Rietveld 408576698