| 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_
|
|
|