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

Unified Diff: chrome/renderer/blocked_plugin.h

Issue 5639004: Implement a useful context menu for the blocked plug-in frame:... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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/app/generated_resources.grd ('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
===================================================================
--- chrome/renderer/blocked_plugin.h (revision 67601)
+++ chrome/renderer/blocked_plugin.h (working copy)
@@ -8,6 +8,7 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+#include "chrome/renderer/custom_menu_listener.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
#include "webkit/glue/cpp_bound_class.h"
#include "webkit/glue/plugins/webview_plugin.h"
@@ -18,7 +19,8 @@
class BlockedPlugin : public CppBoundClass,
public WebViewPlugin::Delegate,
- public NotificationObserver {
+ public NotificationObserver,
+ public CustomMenuListener {
public:
BlockedPlugin(RenderView* render_view,
WebKit::WebFrame* frame,
@@ -33,12 +35,16 @@
// WebViewPlugin::Delegate methods:
virtual void BindWebFrame(WebKit::WebFrame* frame);
virtual void WillDestroyPlugin();
+ virtual void ShowContextMenu(const WebKit::WebMouseEvent&);
// NotificationObserver methods:
virtual void Observe(NotificationType type,
const NotificationSource& source,
const NotificationDetails& details);
+ // CustomMenuListener methods:
+ virtual void MenuItemSelected(unsigned id);
+
private:
virtual ~BlockedPlugin();
@@ -50,10 +56,15 @@
// Load the blocked plugin.
void LoadPlugin();
+ // Hide the blocked plugin.
+ void HidePlugin();
+
RenderView* render_view_;
WebKit::WebFrame* frame_;
WebKit::WebPluginParams plugin_params_;
WebViewPlugin* plugin_;
+ // The name of the plugin that was blocked.
+ string16 name_;
NotificationRegistrar registrar_;
};
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/renderer/blocked_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698