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

Unified Diff: chrome/renderer/blocked_plugin.h

Issue 6312004: Make BlockedPlugin implement RenderViewObserver so that RenderView doesn't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
« no previous file with comments | « no previous file | 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 71581)
+++ chrome/renderer/blocked_plugin.h (working copy)
@@ -6,24 +6,22 @@
#define CHROME_RENDERER_BLOCKED_PLUGIN_H_
#pragma once
-#include "chrome/renderer/custom_menu_listener.h"
+#include "chrome/renderer/render_view_observer.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
#include "webkit/glue/cpp_bound_class.h"
#include "webkit/plugins/npapi/webview_plugin.h"
class GURL;
-class RenderView;
-
namespace webkit {
namespace npapi {
class PluginGroup;
}
}
-class BlockedPlugin : public CppBoundClass,
- public webkit::npapi::WebViewPlugin::Delegate,
- public CustomMenuListener {
+class BlockedPlugin : public RenderViewObserver,
+ public CppBoundClass,
+ public webkit::npapi::WebViewPlugin::Delegate {
public:
BlockedPlugin(RenderView* render_view,
WebKit::WebFrame* frame,
@@ -40,15 +38,17 @@
virtual void WillDestroyPlugin();
virtual void ShowContextMenu(const WebKit::WebMouseEvent&);
- // CustomMenuListener methods:
- virtual void MenuItemSelected(unsigned id);
+ private:
+ virtual ~BlockedPlugin();
+ // RenderViewObserver methods:
+ virtual bool OnMessageReceived(const IPC::Message& message);
+
+ void OnMenuItemSelected(unsigned id);
+
// Load the blocked plugin.
void LoadPlugin();
- private:
- virtual ~BlockedPlugin();
-
// Javascript callbacks:
// Load the blocked plugin by calling LoadPlugin().
// Takes no arguments, and returns nothing.
@@ -61,12 +61,13 @@
// Hide the blocked plugin.
void HidePlugin();
- RenderView* render_view_;
WebKit::WebFrame* frame_;
WebKit::WebPluginParams plugin_params_;
webkit::npapi::WebViewPlugin* plugin_;
// The name of the plugin that was blocked.
string16 name_;
+ // True iff we're showing a custom menu.
+ bool custom_menu_showing_;
};
#endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_
« no previous file with comments | « no previous file | chrome/renderer/blocked_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698