diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-18 05:42:22 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-18 05:42:22 +0000 |
commit | 5ee0cfd0f6f26c262c6b1afde39cd99fc974644d (patch) | |
tree | a399d099a6323b64cedd6c5c1caff6a24c26e7dd /chrome/renderer/blocked_plugin.h | |
parent | 6cc21ff3b73a0558e401c2377d34fdf79053b973 (diff) | |
download | chromium_src-5ee0cfd0f6f26c262c6b1afde39cd99fc974644d.zip chromium_src-5ee0cfd0f6f26c262c6b1afde39cd99fc974644d.tar.gz chromium_src-5ee0cfd0f6f26c262c6b1afde39cd99fc974644d.tar.bz2 |
Make BlockedPlugin implement RenderViewObserver so that RenderView doesn't have to know about it.
Review URL: http://codereview.chromium.org/6312004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71629 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/blocked_plugin.h')
-rw-r--r-- | chrome/renderer/blocked_plugin.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/chrome/renderer/blocked_plugin.h b/chrome/renderer/blocked_plugin.h index defe925..ad1c27e 100644 --- a/chrome/renderer/blocked_plugin.h +++ b/chrome/renderer/blocked_plugin.h @@ -6,14 +6,12 @@ #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/Source/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 { @@ -21,9 +19,9 @@ 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 @@ class BlockedPlugin : public CppBoundClass, 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 @@ class BlockedPlugin : public CppBoundClass, // 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_ |