summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/plugins/missing_plugin.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-06 16:34:17 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-06 16:34:17 +0000
commit3b48dbc794dd45719eb6047968eb1946d39fe59e (patch)
tree61cdc08668739748a0a2de3aa5e582b2b7c4a92c /chrome/renderer/plugins/missing_plugin.h
parent67edf3b5a450c34ded10e67783500376248ba85e (diff)
downloadchromium_src-3b48dbc794dd45719eb6047968eb1946d39fe59e.zip
chromium_src-3b48dbc794dd45719eb6047968eb1946d39fe59e.tar.gz
chromium_src-3b48dbc794dd45719eb6047968eb1946d39fe59e.tar.bz2
Automatically load newly installed plug-ins if they are missing on a page.
To enable this on Mac OS, we also enable plug-in directory watching there. There shouldn't be any false positives causing unnecessary disk hits anymore. BUG=62079 TEST=go to http://www.corp.google.com/~bauerb/no_crawl/test/install_plugin.html, install the missing plug-in. It should automatically load. Review URL: http://codereview.chromium.org/9015025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/plugins/missing_plugin.h')
-rw-r--r--chrome/renderer/plugins/missing_plugin.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/chrome/renderer/plugins/missing_plugin.h b/chrome/renderer/plugins/missing_plugin.h
index bcce19f..93ee8be 100644
--- a/chrome/renderer/plugins/missing_plugin.h
+++ b/chrome/renderer/plugins/missing_plugin.h
@@ -8,13 +8,15 @@
#include "base/string16.h"
#include "chrome/renderer/plugins/plugin_placeholder.h"
+#include "content/public/renderer/render_process_observer.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
namespace content {
class RenderThread;
}
-class MissingPlugin : public PluginPlaceholder {
+class MissingPlugin : public PluginPlaceholder,
+ public content::RenderProcessObserver {
public:
// Creates a new WebViewPlugin with a MissingPlugin as a delegate.
static webkit::WebViewPlugin* Create(
@@ -22,13 +24,6 @@ class MissingPlugin : public PluginPlaceholder {
WebKit::WebFrame* frame,
const WebKit::WebPluginParams& params);
- private:
- MissingPlugin(content::RenderView* render_view,
- WebKit::WebFrame* frame,
- const WebKit::WebPluginParams& params,
- const std::string& html_data);
- virtual ~MissingPlugin();
-
// WebViewPlugin::Delegate methods:
virtual void BindWebFrame(WebKit::WebFrame* frame) OVERRIDE;
virtual void ShowContextMenu(const WebKit::WebMouseEvent&) OVERRIDE;
@@ -40,6 +35,16 @@ class MissingPlugin : public PluginPlaceholder {
// content::RenderViewObserver methods:
virtual void ContextMenuAction(unsigned id) OVERRIDE;
+ // content::RenderProcessObserver methods:
+ virtual void PluginListChanged() OVERRIDE;
+
+ private:
+ MissingPlugin(content::RenderView* render_view,
+ WebKit::WebFrame* frame,
+ const WebKit::WebPluginParams& params,
+ const std::string& html_data);
+ virtual ~MissingPlugin();
+
void HideCallback(const CppArgumentList& args, CppVariant* result);
void OnFoundMissingPlugin(const string16& plugin_name);
@@ -50,8 +55,6 @@ class MissingPlugin : public PluginPlaceholder {
void SetMessage(const string16& message);
void UpdateMessage();
- WebKit::WebString mime_type_;
-
// |routing_id()| is the routing ID of our associated RenderView, but we have
// a separate routing ID for messages specific to this placeholder.
int32 placeholder_routing_id_;