summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/blocked_plugin.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 11:47:40 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 11:47:40 +0000
commit00152e9ffa80198724da8705594cc14c2d7fb5e5 (patch)
tree7750ebd07097e1b0b3620e53f0730dbdbf7775bf /chrome/renderer/blocked_plugin.h
parentbf89db9145b20cafdb4e044a023d95ebfec21478 (diff)
downloadchromium_src-00152e9ffa80198724da8705594cc14c2d7fb5e5.zip
chromium_src-00152e9ffa80198724da8705594cc14c2d7fb5e5.tar.gz
chromium_src-00152e9ffa80198724da8705594cc14c2d7fb5e5.tar.bz2
Add click-to-load functionality for blocked plugins.
BUG=35316 TEST=Disable plugins, go to a site with a flash animation. You should see a placeholder for the flash animation. When you click on it, the animation should load. Review URL: http://codereview.chromium.org/2862031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/blocked_plugin.h')
-rw-r--r--chrome/renderer/blocked_plugin.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/chrome/renderer/blocked_plugin.h b/chrome/renderer/blocked_plugin.h
new file mode 100644
index 0000000..50a8196
--- /dev/null
+++ b/chrome/renderer/blocked_plugin.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_RENDERER_BLOCKED_PLUGIN_H_
+#define CHROME_RENDERER_BLOCKED_PLUGIN_H_
+
+#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
+#include "webkit/glue/cpp_bound_class.h"
+#include "webkit/glue/plugins/webview_plugin.h"
+
+class RenderView;
+
+class BlockedPlugin : public CppBoundClass,
+ public WebViewPlugin::Delegate {
+ public:
+ BlockedPlugin(RenderView* render_view,
+ WebKit::WebFrame* frame,
+ const WebKit::WebPluginParams& params);
+
+ void Load(const CppArgumentList& args, CppVariant* result);
+ void LoadPlugin();
+
+ WebViewPlugin* plugin() { return plugin_; }
+
+ // WebViewPlugin::Delegate methods:
+ virtual void BindWebFrame(WebKit::WebFrame* frame);
+ virtual void WillDestroyPlugin();
+
+ private:
+ virtual ~BlockedPlugin() { }
+
+ RenderView* render_view_;
+ WebKit::WebFrame* frame_;
+ WebKit::WebPluginParams plugin_params_;
+ WebViewPlugin* plugin_;
+};
+
+#endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_