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

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
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.h ('k') | components/plugins/renderer/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..12e7dc96abc881d583eb533847c09f632344bb85 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;
@@ -62,8 +60,13 @@ ChromePluginPlaceholder::ChromePluginPlaceholder(
placeholder_routing_id_(MSG_ROUTING_NONE),
#endif
has_host_(false),
- context_menu_request_id_(0) {
+ context_menu_request_id_(0),
+ weak_factory_(this) {
RenderThread::Get()->AddObserver(this);
+ RegisterCallback(
+ "openAboutPlugins",
+ base::Bind(&ChromePluginPlaceholder::OpenAboutPluginsCallback,
+ weak_factory_.GetWeakPtr()));
}
ChromePluginPlaceholder::~ChromePluginPlaceholder() {
@@ -217,9 +220,7 @@ void ChromePluginPlaceholder::OnLoadBlockedPlugins(
plugins::PluginPlaceholder::OnLoadBlockedPlugins(identifier);
}
-void ChromePluginPlaceholder::OpenAboutPluginsCallback(
- const CppArgumentList& args,
- CppVariant* result) {
+void ChromePluginPlaceholder::OpenAboutPluginsCallback() {
RenderThread::Get()->Send(
new ChromeViewHostMsg_OpenAboutPlugins(routing_id()));
}
@@ -351,10 +352,3 @@ void ChromePluginPlaceholder::ShowContextMenu(const WebMouseEvent& event) {
context_menu_request_id_ = render_view()->ShowContextMenu(this, params);
g_last_active_menu = this;
}
-
-void ChromePluginPlaceholder::BindWebFrame(blink::WebFrame* frame) {
- plugins::PluginPlaceholder::BindWebFrame(frame);
- BindCallback("openAboutPlugins",
- base::Bind(&ChromePluginPlaceholder::OpenAboutPluginsCallback,
- base::Unretained(this)));
-}
« no previous file with comments | « chrome/renderer/plugins/chrome_plugin_placeholder.h ('k') | components/plugins/renderer/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698