| Index: chrome/browser/plugins/plugin_observer.cc
|
| diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
|
| index 6f939ac790ca9b8ad9b3fabee2019b5bf5470162..8fb9c3424ff5bfe9a82602dc67f45e6eca834b05 100644
|
| --- a/chrome/browser/plugins/plugin_observer.cc
|
| +++ b/chrome/browser/plugins/plugin_observer.cc
|
| @@ -267,6 +267,7 @@ bool PluginObserver::OnMessageReceived(
|
| OnShowFlashPermissionBubble)
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_CouldNotLoadPlugin,
|
| OnCouldNotLoadPlugin)
|
| + IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DownloadPDF, OnDownloadPDF)
|
|
|
| IPC_MESSAGE_UNHANDLED(return false)
|
| IPC_END_MESSAGE_MAP()
|
| @@ -335,3 +336,13 @@ void PluginObserver::OnCouldNotLoadPlugin(const base::FilePath& plugin_path) {
|
| plugin_name),
|
| true);
|
| }
|
| +
|
| +void PluginObserver::OnDownloadPDF(const GURL& url) {
|
| + web_contents()->OpenURL(content::OpenURLParams(
|
| + url,
|
| + content::Referrer::SanitizeForRequest(
|
| + url, content::Referrer(web_contents()->GetURL(),
|
| + blink::kWebReferrerPolicyDefault)),
|
| + WindowOpenDisposition::NEW_FOREGROUND_TAB,
|
| + ui::PAGE_TRANSITION_AUTO_BOOKMARK, false));
|
| +}
|
|
|