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..878d5e17bb96d085ee2729b7a7d1ea6c62d8b002 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_OpenPDF, OnOpenPDF) |
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::OnOpenPDF(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)); |
Lei Zhang
2017/07/07 22:47:58
I'm not sure if these are correct, but I also don'
amberwon
2017/07/11 18:08:05
They were used for OnOpenAboutPlugins, when the pl
Lei Zhang
2017/07/12 00:51:37
Well, since the code being referred to was removed
|
+} |