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