| Index: chrome/browser/ui/pdf/pdf_unsupported_feature.cc
|
| diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
|
| index 4ae28c02320d0192f6cee52ec58306d1140a7a04..108bb18f990bba30afe56248e8b260ec0e809cfe 100644
|
| --- a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
|
| +++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc
|
| @@ -14,9 +14,9 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/renderer_preferences_util.h"
|
| #include "chrome/browser/tab_contents/tab_util.h"
|
| -#include "chrome/browser/ui/pdf/open_pdf_in_reader_prompt_delegate.h"
|
| -#include "chrome/browser/ui/pdf/pdf_tab_helper.h"
|
| #include "chrome/common/chrome_content_client.h"
|
| +#include "components/pdf/browser/open_pdf_in_reader_prompt_delegate.h"
|
| +#include "components/pdf/browser/pdf_tab_helper.h"
|
| #include "content/public/browser/interstitial_page.h"
|
| #include "content/public/browser/interstitial_page_delegate.h"
|
| #include "content/public/browser/navigation_details.h"
|
| @@ -53,12 +53,12 @@ const char kAdobeReaderUpdateUrl[] = "http://www.adobe.com/go/getreader_chrome";
|
| // The prompt delegate used to ask the user if they want to use Adobe Reader
|
| // by default.
|
| class PDFEnableAdobeReaderPromptDelegate
|
| - : public OpenPDFInReaderPromptDelegate {
|
| + : public pdf::OpenPDFInReaderPromptDelegate {
|
| public:
|
| explicit PDFEnableAdobeReaderPromptDelegate(Profile* profile);
|
| virtual ~PDFEnableAdobeReaderPromptDelegate();
|
|
|
| - // OpenPDFInReaderPromptDelegate
|
| + // pdf::OpenPDFInReaderPromptDelegate
|
| virtual base::string16 GetMessageText() const OVERRIDE;
|
| virtual base::string16 GetAcceptButtonText() const OVERRIDE;
|
| virtual base::string16 GetCancelButtonText() const OVERRIDE;
|
| @@ -130,7 +130,7 @@ void OpenReaderUpdateURL(WebContents* web_contents) {
|
| // Opens the PDF using Adobe Reader.
|
| void OpenUsingReader(WebContents* web_contents,
|
| const WebPluginInfo& reader_plugin,
|
| - OpenPDFInReaderPromptDelegate* delegate) {
|
| + pdf::OpenPDFInReaderPromptDelegate* delegate) {
|
| ChromePluginServiceFilter::GetInstance()->OverridePluginForFrame(
|
| web_contents->GetRenderProcessHost()->GetID(),
|
| web_contents->GetMainFrame()->GetRoutingID(),
|
| @@ -138,7 +138,8 @@ void OpenUsingReader(WebContents* web_contents,
|
| reader_plugin);
|
| web_contents->ReloadFocusedFrame(false);
|
|
|
| - PDFTabHelper* pdf_tab_helper = PDFTabHelper::FromWebContents(web_contents);
|
| + pdf::PDFTabHelper* pdf_tab_helper =
|
| + pdf::PDFTabHelper::FromWebContents(web_contents);
|
| if (delegate)
|
| pdf_tab_helper->ShowOpenInReaderPrompt(make_scoped_ptr(delegate));
|
| }
|
| @@ -231,14 +232,14 @@ class PDFUnsupportedFeatureInterstitial
|
| // The delegate for the bubble used to inform the user that we don't support a
|
| // feature in the PDF.
|
| class PDFUnsupportedFeaturePromptDelegate
|
| - : public OpenPDFInReaderPromptDelegate {
|
| + : public pdf::OpenPDFInReaderPromptDelegate {
|
| public:
|
| PDFUnsupportedFeaturePromptDelegate(
|
| WebContents* web_contents,
|
| const AdobeReaderPluginInfo& reader_info);
|
| virtual ~PDFUnsupportedFeaturePromptDelegate();
|
|
|
| - // OpenPDFInReaderPromptDelegate:
|
| + // pdf::OpenPDFInReaderPromptDelegate:
|
| virtual base::string16 GetMessageText() const OVERRIDE;
|
| virtual base::string16 GetAcceptButtonText() const OVERRIDE;
|
| virtual base::string16 GetCancelButtonText() const OVERRIDE;
|
| @@ -313,7 +314,7 @@ void PDFUnsupportedFeaturePromptDelegate::Accept() {
|
|
|
| Profile* profile =
|
| Profile::FromBrowserContext(web_contents_->GetBrowserContext());
|
| - OpenPDFInReaderPromptDelegate* delegate =
|
| + pdf::OpenPDFInReaderPromptDelegate* delegate =
|
| new PDFEnableAdobeReaderPromptDelegate(profile);
|
|
|
| OpenUsingReader(web_contents_, reader_info_.plugin_info, delegate);
|
| @@ -331,9 +332,10 @@ void MaybeShowOpenPDFInReaderPrompt(WebContents* web_contents,
|
| if (!reader_info.is_installed || !reader_info.is_enabled)
|
| return;
|
|
|
| - scoped_ptr<OpenPDFInReaderPromptDelegate> prompt(
|
| + scoped_ptr<pdf::OpenPDFInReaderPromptDelegate> prompt(
|
| new PDFUnsupportedFeaturePromptDelegate(web_contents, reader_info));
|
| - PDFTabHelper* pdf_tab_helper = PDFTabHelper::FromWebContents(web_contents);
|
| + pdf::PDFTabHelper* pdf_tab_helper =
|
| + pdf::PDFTabHelper::FromWebContents(web_contents);
|
| pdf_tab_helper->ShowOpenInReaderPrompt(prompt.Pass());
|
| }
|
|
|
|
|