| 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 #ifndef CHROME_BROWSER_UI_PDF_PDF_TAB_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_PDF_PDF_TAB_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_UI_PDF_PDF_TAB_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_PDF_PDF_TAB_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
| 10 | 10 |
| 11 class TabContentsWrapper; | 11 class TabContents; |
| 12 typedef TabContents TabContentsWrapper; |
| 12 | 13 |
| 13 // Per-tab class to handle PDF messages. | 14 // Per-tab class to handle PDF messages. |
| 14 class PDFTabObserver : public content::WebContentsObserver { | 15 class PDFTabObserver : public content::WebContentsObserver { |
| 15 public: | 16 public: |
| 16 explicit PDFTabObserver(TabContentsWrapper* wrapper); | 17 explicit PDFTabObserver(TabContentsWrapper* wrapper); |
| 17 virtual ~PDFTabObserver(); | 18 virtual ~PDFTabObserver(); |
| 18 | 19 |
| 19 private: | 20 private: |
| 20 // content::WebContentsObserver overrides: | 21 // content::WebContentsObserver overrides: |
| 21 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 22 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 22 | 23 |
| 23 // Internal helpers ---------------------------------------------------------- | 24 // Internal helpers ---------------------------------------------------------- |
| 24 | 25 |
| 25 // Message handlers. | 26 // Message handlers. |
| 26 void OnPDFHasUnsupportedFeature(); | 27 void OnPDFHasUnsupportedFeature(); |
| 27 | 28 |
| 28 // Our owning TabContentsWrapper. | 29 // Our owning TabContentsWrapper. |
| 29 TabContentsWrapper* wrapper_; | 30 TabContentsWrapper* wrapper_; |
| 30 | 31 |
| 31 DISALLOW_COPY_AND_ASSIGN(PDFTabObserver); | 32 DISALLOW_COPY_AND_ASSIGN(PDFTabObserver); |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 #endif // CHROME_BROWSER_UI_PDF_PDF_TAB_OBSERVER_H_ | 35 #endif // CHROME_BROWSER_UI_PDF_PDF_TAB_OBSERVER_H_ |
| OLD | NEW |