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

Unified Diff: chrome/renderer/blocked_plugin.h

Issue 2967007: Disable outdated plugins, block non-sandboxed plugins. (Closed)
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/blocked_plugin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/blocked_plugin.h
diff --git a/chrome/renderer/blocked_plugin.h b/chrome/renderer/blocked_plugin.h
index 50a81969c3a3edea4aa5eba2bec8ff7b0d139d93..8d268c0f90f7413f9b930ca00e7ffde4e16063ca 100644
--- a/chrome/renderer/blocked_plugin.h
+++ b/chrome/renderer/blocked_plugin.h
@@ -5,21 +5,24 @@
#ifndef CHROME_RENDERER_BLOCKED_PLUGIN_H_
#define CHROME_RENDERER_BLOCKED_PLUGIN_H_
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.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 GURL;
+class PluginGroup;
class RenderView;
class BlockedPlugin : public CppBoundClass,
- public WebViewPlugin::Delegate {
+ public WebViewPlugin::Delegate,
+ public NotificationObserver {
public:
BlockedPlugin(RenderView* render_view,
WebKit::WebFrame* frame,
- const WebKit::WebPluginParams& params);
-
- void Load(const CppArgumentList& args, CppVariant* result);
- void LoadPlugin();
+ const WebKit::WebPluginParams& params,
+ PluginGroup* group);
WebViewPlugin* plugin() { return plugin_; }
@@ -27,13 +30,36 @@ class BlockedPlugin : public CppBoundClass,
virtual void BindWebFrame(WebKit::WebFrame* frame);
virtual void WillDestroyPlugin();
+ // NotificationObserver methods:
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
private:
virtual ~BlockedPlugin() { }
+ // Javascript callbacks:
+ // Load the blocked plugin by calling LoadPlugin() below.
+ // Takes no arguments, and returns nothing.
+ void Load(const CppArgumentList& args, CppVariant* result);
+
+ // Update an outdated plugin. Takes one argument, the URL to download the
+ // latest version, and returns nothing.
+ void Update(const CppArgumentList& args, CppVariant* result);
+
+ // Tells the browser to navigate to |url| (to download the latest version of
+ // the plugin there).
+ void OpenURL(GURL& url);
+
+ // Load the blocked plugin.
+ void LoadPlugin();
+
RenderView* render_view_;
WebKit::WebFrame* frame_;
WebKit::WebPluginParams plugin_params_;
WebViewPlugin* plugin_;
+
+ NotificationRegistrar registrar_;
};
#endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/blocked_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698