| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/pdf/pdf_unsupported_feature.h" | 5 #include "chrome/browser/ui/pdf/pdf_unsupported_feature.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 return; | 205 return; |
| 206 } | 206 } |
| 207 | 207 |
| 208 if (command == "1") { | 208 if (command == "1") { |
| 209 content::RecordAction( | 209 content::RecordAction( |
| 210 UserMetricsAction("PDF_ReaderInterstitialUpdate")); | 210 UserMetricsAction("PDF_ReaderInterstitialUpdate")); |
| 211 OpenReaderUpdateURL(web_contents_); | 211 OpenReaderUpdateURL(web_contents_); |
| 212 } else if (command == "2") { | 212 } else if (command == "2") { |
| 213 content::RecordAction( | 213 content::RecordAction( |
| 214 UserMetricsAction("PDF_ReaderInterstitialIgnore")); | 214 UserMetricsAction("PDF_ReaderInterstitialIgnore")); |
| 215 // Pretend that the plugin is up-to-date so that we don't block it. | 215 // Pretend that the plugin is up to date so that we don't block it. |
| 216 reader_webplugininfo_.version = base::ASCIIToUTF16("11.0.0.0"); | 216 reader_webplugininfo_.version = base::ASCIIToUTF16("11.0.0.0"); |
| 217 OpenUsingReader(web_contents_, reader_webplugininfo_, NULL); | 217 OpenUsingReader(web_contents_, reader_webplugininfo_, NULL); |
| 218 } else { | 218 } else { |
| 219 NOTREACHED(); | 219 NOTREACHED(); |
| 220 } | 220 } |
| 221 interstitial_page_->Proceed(); | 221 interstitial_page_->Proceed(); |
| 222 } | 222 } |
| 223 | 223 |
| 224 void OverrideRendererPrefs(content::RendererPreferences* prefs) override { | 224 void OverrideRendererPrefs(content::RendererPreferences* prefs) override { |
| 225 Profile* profile = | 225 Profile* profile = |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 MaybeShowOpenPDFInReaderPrompt(web_contents, reader_info); | 357 MaybeShowOpenPDFInReaderPrompt(web_contents, reader_info); |
| 358 return; | 358 return; |
| 359 } | 359 } |
| 360 GetAdobeReaderPluginInfoAsync( | 360 GetAdobeReaderPluginInfoAsync( |
| 361 profile, | 361 profile, |
| 362 base::Bind(&GotPluginsCallback, | 362 base::Bind(&GotPluginsCallback, |
| 363 web_contents->GetRenderProcessHost()->GetID(), | 363 web_contents->GetRenderProcessHost()->GetID(), |
| 364 web_contents->GetRenderViewHost()->GetRoutingID())); | 364 web_contents->GetRenderViewHost()->GetRoutingID())); |
| 365 #endif // defined(OS_WIN) | 365 #endif // defined(OS_WIN) |
| 366 } | 366 } |
| OLD | NEW |