Chromium Code Reviews| Index: components/plugins/renderer/plugin_placeholder.h |
| diff --git a/components/plugins/renderer/plugin_placeholder.h b/components/plugins/renderer/plugin_placeholder.h |
| index d8b7d1a4b69727803ca0f9356ea4aff4554bf91b..c1cbbcebb28d9813d3c78f0ba1471d65277bd739 100644 |
| --- a/components/plugins/renderer/plugin_placeholder.h |
| +++ b/components/plugins/renderer/plugin_placeholder.h |
| @@ -10,8 +10,8 @@ |
| #include "content/public/renderer/context_menu_client.h" |
| #include "content/public/renderer/render_frame_observer.h" |
| #include "content/public/renderer/render_process_observer.h" |
| +#include "gin/wrappable.h" |
| #include "third_party/WebKit/public/web/WebPluginParams.h" |
| -#include "webkit/renderer/cpp_bound_class.h" |
| namespace content { |
| struct WebPluginInfo; |
| @@ -21,9 +21,10 @@ namespace plugins { |
| // Placeholders can be used if a plug-in is missing or not available |
| // (blocked or disabled). |
| class PluginPlaceholder : public content::RenderFrameObserver, |
| - public webkit_glue::CppBoundClass, |
| - public WebViewPlugin::Delegate { |
| + public WebViewPlugin::Delegate, |
| + public gin::Wrappable<PluginPlaceholder> { |
|
Bernhard Bauer
2014/01/07 09:35:42
Nit: I like listing the "real" superclass first (i
|
| public: |
| + static gin::WrapperInfo kWrapperInfo; |
| WebViewPlugin* plugin() { return plugin_; } |
| @@ -65,28 +66,26 @@ class PluginPlaceholder : public content::RenderFrameObserver, |
| // Load the blocked plugin. |
| void LoadPlugin(); |
| - // WebViewPlugin::Delegate method: |
| - virtual void BindWebFrame(blink::WebFrame* frame) OVERRIDE; |
| + // gin::Wrappable method: |
| + virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| + v8::Isolate* isolate) OVERRIDE; |
| private: |
| // WebViewPlugin::Delegate methods: |
| - virtual void WillDestroyPlugin() OVERRIDE; |
| virtual void ShowContextMenu(const blink::WebMouseEvent&) OVERRIDE; |
| + // RenderFrameObserver methods: |
| + virtual void OnDestruct() OVERRIDE; |
| + |
| // Javascript callbacks: |
| - // All ignore arguments (which are, however, required by caller) and return |
| - // nothing. |
| // Load the blocked plugin by calling LoadPlugin(). |
| - void LoadCallback(const webkit_glue::CppArgumentList& args, |
| - webkit_glue::CppVariant* result); |
| + void LoadCallback(); |
| // Hide the blocked plugin by calling HidePlugin(). |
| - void HideCallback(const webkit_glue::CppArgumentList& args, |
| - webkit_glue::CppVariant* result); |
| + void HideCallback(); |
| - void DidFinishLoadingCallback(const webkit_glue::CppArgumentList& args, |
| - webkit_glue::CppVariant* result); |
| + void DidFinishLoadingCallback(); |
| void UpdateMessage(); |