| Index: chrome/renderer/plugins/blocked_plugin.h
|
| diff --git a/chrome/renderer/blocked_plugin.h b/chrome/renderer/plugins/blocked_plugin.h
|
| similarity index 65%
|
| rename from chrome/renderer/blocked_plugin.h
|
| rename to chrome/renderer/plugins/blocked_plugin.h
|
| index abff76d1ded3adf13710fc7e555a676c5c0f41ff..597b5e78cf274a40044884c84ff02b0a8cd29755 100644
|
| --- a/chrome/renderer/blocked_plugin.h
|
| +++ b/chrome/renderer/plugins/blocked_plugin.h
|
| @@ -2,41 +2,47 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_RENDERER_BLOCKED_PLUGIN_H_
|
| -#define CHROME_RENDERER_BLOCKED_PLUGIN_H_
|
| +#ifndef CHROME_RENDERER_PLUGINS_BLOCKED_PLUGIN_H_
|
| +#define CHROME_RENDERER_PLUGINS_BLOCKED_PLUGIN_H_
|
| #pragma once
|
|
|
| -#include "content/public/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"
|
| +#include "chrome/renderer/plugins/plugin_placeholder.h"
|
| #include "webkit/plugins/webplugininfo.h"
|
|
|
| -class BlockedPlugin : public content::RenderViewObserver,
|
| - public CppBoundClass,
|
| - public webkit::npapi::WebViewPlugin::Delegate {
|
| +namespace webkit {
|
| +namespace npapi {
|
| +class PluginGroup;
|
| +}
|
| +}
|
| +
|
| +class BlockedPlugin : public PluginPlaceholder {
|
| public:
|
| + // Creates a new WebViewPlugin with a BlockedPlugin as a delegate.
|
| + static webkit::WebViewPlugin* Create(content::RenderView* render_view,
|
| + WebKit::WebFrame* frame,
|
| + const WebKit::WebPluginParams& params,
|
| + const webkit::WebPluginInfo& info,
|
| + const webkit::npapi::PluginGroup* group,
|
| + int resource_id,
|
| + int message_id,
|
| + bool is_blocked_for_prerendering,
|
| + bool allow_loading);
|
| +
|
| + private:
|
| BlockedPlugin(content::RenderView* render_view,
|
| WebKit::WebFrame* frame,
|
| - const webkit::WebPluginInfo& info,
|
| const WebKit::WebPluginParams& params,
|
| - const WebPreferences& settings,
|
| - int template_id,
|
| + const std::string& html_data,
|
| + const webkit::WebPluginInfo& info,
|
| const string16& name,
|
| - const string16& message,
|
| bool is_blocked_for_prerendering,
|
| bool allow_loading);
|
| -
|
| - webkit::npapi::WebViewPlugin* plugin() { return plugin_; }
|
| + virtual ~BlockedPlugin();
|
|
|
| // WebViewPlugin::Delegate methods:
|
| virtual void BindWebFrame(WebKit::WebFrame* frame) OVERRIDE;
|
| - virtual void WillDestroyPlugin() OVERRIDE;
|
| virtual void ShowContextMenu(const WebKit::WebMouseEvent&) OVERRIDE;
|
|
|
| - private:
|
| - virtual ~BlockedPlugin();
|
| -
|
| // RenderViewObserver methods:
|
| virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
|
| virtual void ContextMenuAction(unsigned id) OVERRIDE;
|
| @@ -63,10 +69,7 @@ class BlockedPlugin : public content::RenderViewObserver,
|
| // Hide the blocked plugin.
|
| void HidePlugin();
|
|
|
| - WebKit::WebFrame* frame_;
|
| webkit::WebPluginInfo plugin_info_;
|
| - WebKit::WebPluginParams plugin_params_;
|
| - webkit::npapi::WebViewPlugin* plugin_;
|
| // The name of the plugin that was blocked.
|
| string16 name_;
|
| // True iff the plugin was blocked because the page was being prerendered.
|
| @@ -76,4 +79,4 @@ class BlockedPlugin : public content::RenderViewObserver,
|
| bool allow_loading_;
|
| };
|
|
|
| -#endif // CHROME_RENDERER_BLOCKED_PLUGIN_H_
|
| +#endif // CHROME_RENDERER_PLUGINS_BLOCKED_PLUGIN_H_
|
|
|