Chromium Code Reviews| 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..3fd5b2efc176d29346378442f1d715c1625ad237 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; |
| @@ -217,11 +215,13 @@ void ChromePluginPlaceholder::OnLoadBlockedPlugins( |
| plugins::PluginPlaceholder::OnLoadBlockedPlugins(identifier); |
| } |
| +// static |
| void ChromePluginPlaceholder::OpenAboutPluginsCallback( |
|
Bernhard Bauer
2013/11/12 16:37:20
If this is a static method now, you can move it to
|
| - const CppArgumentList& args, |
| - CppVariant* result) { |
| + const v8::FunctionCallbackInfo<v8::Value>& args) { |
| + ChromePluginPlaceholder* plugin = reinterpret_cast<ChromePluginPlaceholder*>( |
| + v8::External::Cast(*args.Data())->Value()); |
| RenderThread::Get()->Send( |
| - new ChromeViewHostMsg_OpenAboutPlugins(routing_id())); |
| + new ChromeViewHostMsg_OpenAboutPlugins(plugin->routing_id())); |
| } |
| void ChromePluginPlaceholder::OnSetIsPrerendering(bool is_prerendering) { |
| @@ -352,9 +352,10 @@ 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::InstallAdditionalCallbacks( |
| + v8::Handle<v8::Template> prototype) { |
| + prototype->Set(v8::String::New("openAboutPlugins"), |
| + v8::FunctionTemplate::New( |
| + &ChromePluginPlaceholder::OpenAboutPluginsCallback, |
| + v8::External::New(this))->GetFunction()); |
| } |