| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/pdf_unsupported_feature.h" | 5 #include "chrome/browser/pdf_unsupported_feature.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "base/version.h" | 10 #include "base/version.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 false, ASCIIToUTF16(chrome::ChromeContentClient::kPDFPluginName)); | 122 false, ASCIIToUTF16(chrome::ChromeContentClient::kPDFPluginName)); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void PDFEnableAdobeReaderInfoBarDelegate::OnNo() { | 125 void PDFEnableAdobeReaderInfoBarDelegate::OnNo() { |
| 126 UserMetrics::RecordAction(UserMetricsAction("PDF_EnableReaderInfoBarCancel")); | 126 UserMetrics::RecordAction(UserMetricsAction("PDF_EnableReaderInfoBarCancel")); |
| 127 } | 127 } |
| 128 | 128 |
| 129 // Launch the url to get the latest Adbobe Reader installer. | 129 // Launch the url to get the latest Adbobe Reader installer. |
| 130 void OpenReaderUpdateURL(TabContents* tab) { | 130 void OpenReaderUpdateURL(TabContents* tab) { |
| 131 tab->OpenURL(GURL(kReaderUpdateUrl), GURL(), CURRENT_TAB, | 131 tab->OpenURL(GURL(kReaderUpdateUrl), GURL(), CURRENT_TAB, |
| 132 PageTransition::LINK); | 132 content::PAGE_TRANSITION_LINK); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // Opens the PDF using Adobe Reader. | 135 // Opens the PDF using Adobe Reader. |
| 136 void OpenUsingReader(TabContentsWrapper* tab, | 136 void OpenUsingReader(TabContentsWrapper* tab, |
| 137 const WebPluginInfo& reader_plugin, | 137 const WebPluginInfo& reader_plugin, |
| 138 InfoBarDelegate* old_delegate, | 138 InfoBarDelegate* old_delegate, |
| 139 InfoBarDelegate* new_delegate) { | 139 InfoBarDelegate* new_delegate) { |
| 140 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( | 140 ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( |
| 141 tab->render_view_host()->process()->id(), | 141 tab->render_view_host()->process()->id(), |
| 142 tab->render_view_host()->routing_id(), | 142 tab->render_view_host()->routing_id(), |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 // Only works for Windows for now. For Mac, we'll have to launch the file | 400 // Only works for Windows for now. For Mac, we'll have to launch the file |
| 401 // externally since Adobe Reader doesn't work inside Chrome. | 401 // externally since Adobe Reader doesn't work inside Chrome. |
| 402 return; | 402 return; |
| 403 #endif | 403 #endif |
| 404 | 404 |
| 405 PluginService::GetInstance()->GetPluginGroups( | 405 PluginService::GetInstance()->GetPluginGroups( |
| 406 base::Bind(&GotPluginGroupsCallback, | 406 base::Bind(&GotPluginGroupsCallback, |
| 407 tab->render_view_host()->process()->id(), | 407 tab->render_view_host()->process()->id(), |
| 408 tab->render_view_host()->routing_id())); | 408 tab->render_view_host()->routing_id())); |
| 409 } | 409 } |
| OLD | NEW |