diff options
| author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 16:34:17 +0000 |
|---|---|---|
| committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 16:34:17 +0000 |
| commit | 3b48dbc794dd45719eb6047968eb1946d39fe59e (patch) | |
| tree | 61cdc08668739748a0a2de3aa5e582b2b7c4a92c /chrome/renderer/chrome_content_renderer_client.cc | |
| parent | 67edf3b5a450c34ded10e67783500376248ba85e (diff) | |
| download | chromium_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/chrome_content_renderer_client.cc')
| -rw-r--r-- | chrome/renderer/chrome_content_renderer_client.cc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index de52237..447dd4f 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -285,8 +285,16 @@ bool ChromeContentRendererClient::OverrideCreatePlugin( content::RenderView* render_view, WebFrame* frame, const WebPluginParams& params, - WebKit::WebPlugin** plugin) { - *plugin = CreatePlugin(render_view, frame, params); + WebPlugin** plugin) { + ChromeViewHostMsg_GetPluginInfo_Status status; + webkit::WebPluginInfo plugin_info; + std::string actual_mime_type; + render_view->Send(new ChromeViewHostMsg_GetPluginInfo( + render_view->GetRoutingId(), GURL(params.url), + frame->top()->document().url(), params.mimeType.utf8(), + &status, &plugin_info, &actual_mime_type)); + *plugin = CreatePlugin(render_view, frame, params, + status, plugin_info, actual_mime_type); return true; } @@ -311,17 +319,13 @@ bool ChromeContentRendererClient::OverrideCreateWebMediaPlayer( WebPlugin* ChromeContentRendererClient::CreatePlugin( content::RenderView* render_view, WebFrame* frame, - const WebPluginParams& original_params) { + const WebPluginParams& original_params, + const ChromeViewHostMsg_GetPluginInfo_Status& status, + const webkit::WebPluginInfo& plugin, + const std::string& actual_mime_type) { CommandLine* cmd = CommandLine::ForCurrentProcess(); GURL url(original_params.url); std::string orig_mime_type = original_params.mimeType.utf8(); - ChromeViewHostMsg_GetPluginInfo_Status status; - webkit::WebPluginInfo plugin; - std::string actual_mime_type; - render_view->Send(new ChromeViewHostMsg_GetPluginInfo( - render_view->GetRoutingId(), url, frame->top()->document().url(), - orig_mime_type, &status, &plugin, &actual_mime_type)); - if (status.value == ChromeViewHostMsg_GetPluginInfo_Status::kNotFound) { MissingPluginReporter::GetInstance()->ReportPluginMissing( orig_mime_type, url); |
