| 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 #ifndef COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ | 5 #ifndef COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ |
| 6 #define COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ | 6 #define COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 void ShowOpenInReaderPrompt(scoped_ptr<OpenPDFInReaderPromptClient> prompt); | 38 void ShowOpenInReaderPrompt(scoped_ptr<OpenPDFInReaderPromptClient> prompt); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 PDFWebContentsHelper(content::WebContents* web_contents, | 41 PDFWebContentsHelper(content::WebContents* web_contents, |
| 42 scoped_ptr<PDFWebContentsHelperClient> client); | 42 scoped_ptr<PDFWebContentsHelperClient> client); |
| 43 virtual ~PDFWebContentsHelper(); | 43 virtual ~PDFWebContentsHelper(); |
| 44 | 44 |
| 45 // content::WebContentsObserver overrides: | 45 // content::WebContentsObserver overrides: |
| 46 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 46 virtual bool OnMessageReceived(const IPC::Message& message) override; |
| 47 virtual void DidNavigateMainFrame( | 47 virtual void DidNavigateMainFrame( |
| 48 const content::LoadCommittedDetails& details, | 48 const content::LoadCommittedDetails& details, |
| 49 const content::FrameNavigateParams& params) OVERRIDE; | 49 const content::FrameNavigateParams& params) override; |
| 50 | 50 |
| 51 // Internal helpers ---------------------------------------------------------- | 51 // Internal helpers ---------------------------------------------------------- |
| 52 | 52 |
| 53 void UpdateLocationBar(); | 53 void UpdateLocationBar(); |
| 54 void OnModalPromptForPasswordClosed(IPC::Message* reply_message, | 54 void OnModalPromptForPasswordClosed(IPC::Message* reply_message, |
| 55 bool success, | 55 bool success, |
| 56 const base::string16& actual_value); | 56 const base::string16& actual_value); |
| 57 | 57 |
| 58 // Message handlers. | 58 // Message handlers. |
| 59 void OnHasUnsupportedFeature(); | 59 void OnHasUnsupportedFeature(); |
| 60 void OnSaveURLAs(const GURL& url, const content::Referrer& referrer); | 60 void OnSaveURLAs(const GURL& url, const content::Referrer& referrer); |
| 61 void OnUpdateContentRestrictions(int content_restrictions); | 61 void OnUpdateContentRestrictions(int content_restrictions); |
| 62 void OnModalPromptForPassword(const std::string& prompt, | 62 void OnModalPromptForPassword(const std::string& prompt, |
| 63 IPC::Message* reply_message); | 63 IPC::Message* reply_message); |
| 64 | 64 |
| 65 // The model for the confirmation prompt to open a PDF in Adobe Reader. | 65 // The model for the confirmation prompt to open a PDF in Adobe Reader. |
| 66 scoped_ptr<OpenPDFInReaderPromptClient> open_in_reader_prompt_; | 66 scoped_ptr<OpenPDFInReaderPromptClient> open_in_reader_prompt_; |
| 67 scoped_ptr<PDFWebContentsHelperClient> client_; | 67 scoped_ptr<PDFWebContentsHelperClient> client_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper); | 69 DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace pdf | 72 } // namespace pdf |
| 73 | 73 |
| 74 #endif // COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ | 74 #endif // COMPONENTS_PDF_BROWSER_PDF_WEB_CONTENTS_HELPER_H_ |
| OLD | NEW |