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

Unified Diff: components/plugins/renderer/plugin_placeholder.h

Issue 116163008: Move the plugin placeholder from CppBoundClass to gin::Wrappable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 11 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: 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> {
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();
« no previous file with comments | « components/plugins/renderer/mobile_youtube_plugin.cc ('k') | components/plugins/renderer/plugin_placeholder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698