diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-22 00:05:17 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-22 00:05:17 +0000 |
commit | c8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244 (patch) | |
tree | d2658c6f1da345a1f38531809250c934dd4d73fa /chrome/browser/renderer_host | |
parent | 090d7108424b5a8600e1b590b2227e52f23d6e7e (diff) | |
download | chromium_src-c8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244.zip chromium_src-c8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244.tar.gz chromium_src-c8f73aba9f1fd8b2e0a34fcca08a1e968ddd8244.tar.bz2 |
When we detect a PDF with an unsupported feature, ask the user if they want to view it with Adobe Reader if it's installed. If it's not, ask them if they want to launch the url to install it. If it's installed and out of date, show an interstitial.
BUG=65339
Review URL: http://codereview.chromium.org/6259008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host')
5 files changed, 16 insertions, 22 deletions
diff --git a/chrome/browser/renderer_host/render_message_filter.cc b/chrome/browser/renderer_host/render_message_filter.cc index 4156424..e00a6b8 100644 --- a/chrome/browser/renderer_host/render_message_filter.cc +++ b/chrome/browser/renderer_host/render_message_filter.cc @@ -648,7 +648,8 @@ void RenderMessageFilter::OnGetPluginsOnFileThread( NewRunnableMethod(this, &RenderMessageFilter::Send, reply_msg)); } -void RenderMessageFilter::OnGetPluginInfo(const GURL& url, +void RenderMessageFilter::OnGetPluginInfo(int routing_id, + const GURL& url, const GURL& policy_url, const std::string& mime_type, IPC::Message* reply_msg) { @@ -658,20 +659,20 @@ void RenderMessageFilter::OnGetPluginInfo(const GURL& url, BrowserThread::FILE, FROM_HERE, NewRunnableMethod( this, &RenderMessageFilter::OnGetPluginInfoOnFileThread, - url, policy_url, mime_type, reply_msg)); + routing_id, url, policy_url, mime_type, reply_msg)); } void RenderMessageFilter::OnGetPluginInfoOnFileThread( + int render_view_id, const GURL& url, const GURL& policy_url, const std::string& mime_type, IPC::Message* reply_msg) { std::string actual_mime_type; webkit::npapi::WebPluginInfo info; - bool found = plugin_service_->GetFirstAllowedPluginInfo(url, - mime_type, - &info, - &actual_mime_type); + bool found = plugin_service_->GetFirstAllowedPluginInfo( + render_process_id_, render_view_id, url, mime_type, &info, + &actual_mime_type); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod( @@ -704,12 +705,12 @@ void RenderMessageFilter::OnGotPluginInfo( Send(reply_msg); } -void RenderMessageFilter::OnOpenChannelToPlugin(const GURL& url, +void RenderMessageFilter::OnOpenChannelToPlugin(int routing_id, + const GURL& url, const std::string& mime_type, IPC::Message* reply_msg) { plugin_service_->OpenChannelToPlugin( - url, - mime_type, + render_process_id_, routing_id, url, mime_type, new OpenChannelToPluginCallback(this, reply_msg)); } diff --git a/chrome/browser/renderer_host/render_message_filter.h b/chrome/browser/renderer_host/render_message_filter.h index c4af367..dee75a0 100644 --- a/chrome/browser/renderer_host/render_message_filter.h +++ b/chrome/browser/renderer_host/render_message_filter.h @@ -143,11 +143,13 @@ class RenderMessageFilter : public BrowserMessageFilter, #endif void OnGetPlugins(bool refresh, IPC::Message* reply_msg); void OnGetPluginsOnFileThread(bool refresh, IPC::Message* reply_msg); - void OnGetPluginInfo(const GURL& url, + void OnGetPluginInfo(int routing_id, + const GURL& url, const GURL& policy_url, const std::string& mime_type, IPC::Message* reply_msg); - void OnGetPluginInfoOnFileThread(const GURL& url, + void OnGetPluginInfoOnFileThread(int render_view_id, + const GURL& url, const GURL& policy_url, const std::string& mime_type, IPC::Message* reply_msg); @@ -156,7 +158,8 @@ class RenderMessageFilter : public BrowserMessageFilter, const std::string& actual_mime_type, const GURL& policy_url, IPC::Message* reply_msg); - void OnOpenChannelToPlugin(const GURL& url, + void OnOpenChannelToPlugin(int routing_id, + const GURL& url, const std::string& mime_type, IPC::Message* reply_msg); void OnOpenChannelToPepperPlugin(const FilePath& path, diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 5c5e9b3..fc62759 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -847,8 +847,6 @@ bool RenderViewHost::OnMessageReceived(const IPC::Message& msg) { IPC_MESSAGE_HANDLER(ViewHostMsg_DetectedPhishingSite, OnDetectedPhishingSite) IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) - IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateContentRestrictions, - OnUpdateContentRestrictions) #if defined(OS_MACOSX) IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) #endif @@ -1925,10 +1923,6 @@ void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { Details<std::pair<int, Value*> >(&details)); } -void RenderViewHost::OnUpdateContentRestrictions(int restrictions) { - delegate_->UpdateContentRestrictions(restrictions); -} - #if defined(OS_MACOSX) void RenderViewHost::OnMsgShowPopup( const ViewHostMsg_ShowPopup_Params& params) { diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 4b8619e..1174588 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -684,7 +684,6 @@ class RenderViewHost : public RenderWidgetHost { void OnInstantSupportDetermined(int32 page_id, bool result); void OnDetectedPhishingSite(const GURL& phishing_url, double phishing_score); void OnScriptEvalResponse(int id, const ListValue& result); - void OnUpdateContentRestrictions(int restrictions); void OnPagesReadyForPreview( const ViewHostMsg_DidPreviewDocument_Params& params); diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h index 6bd228e..ccd7e01 100644 --- a/chrome/browser/renderer_host/render_view_host_delegate.h +++ b/chrome/browser/renderer_host/render_view_host_delegate.h @@ -745,9 +745,6 @@ class RenderViewHostDelegate : public IPC::Channel::Listener { int maximum_percent, bool remember) {} - // Update the content restrictions, i.e. disable print/copy. - virtual void UpdateContentRestrictions(int restrictions) {} - protected: virtual ~RenderViewHostDelegate() {} }; |