| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ |
| 6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ | 6 #define COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "components/translate/core/browser/translate_driver.h" | 9 #include "components/translate/core/browser/translate_driver.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 class NavigationController; | 12 class NavigationController; |
| 13 class WebContents; | 13 class WebContents; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace translate { |
| 17 |
| 16 // Content implementation of TranslateDriver. | 18 // Content implementation of TranslateDriver. |
| 17 class ContentTranslateDriver : public TranslateDriver { | 19 class ContentTranslateDriver : public TranslateDriver { |
| 18 public: | 20 public: |
| 19 | 21 |
| 20 // The observer for the ContentTranslateDriver. | 22 // The observer for the ContentTranslateDriver. |
| 21 class Observer { | 23 class Observer { |
| 22 public: | 24 public: |
| 23 // Handles when the value of IsPageTranslated is changed. | 25 // Handles when the value of IsPageTranslated is changed. |
| 24 virtual void OnIsPageTranslatedChanged(content::WebContents* source) = 0; | 26 virtual void OnIsPageTranslatedChanged(content::WebContents* source) = 0; |
| 25 | 27 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 55 | 57 |
| 56 private: | 58 private: |
| 57 // The navigation controller of the tab we are associated with. | 59 // The navigation controller of the tab we are associated with. |
| 58 content::NavigationController* navigation_controller_; | 60 content::NavigationController* navigation_controller_; |
| 59 | 61 |
| 60 Observer* observer_; | 62 Observer* observer_; |
| 61 | 63 |
| 62 DISALLOW_COPY_AND_ASSIGN(ContentTranslateDriver); | 64 DISALLOW_COPY_AND_ASSIGN(ContentTranslateDriver); |
| 63 }; | 65 }; |
| 64 | 66 |
| 67 } // namespace translate |
| 68 |
| 65 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ | 69 #endif // COMPONENTS_TRANSLATE_CONTENT_BROWSER_CONTENT_TRANSLATE_DRIVER_H_ |
| OLD | NEW |