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 CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_ |
6 #define CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_ |
7 | 7 |
8 #include "components/translate/content/browser/content_translate_driver.h" | 8 #include "components/translate/content/browser/content_translate_driver.h" |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 | 12 |
13 class Browser; | 13 class Browser; |
14 | 14 |
15 // Implementation of ContentTranslateDriver::Observer for Browser. This observes | 15 // Implementation of ContentTranslateDriver::Observer for Browser. This observes |
16 // wether Translate is enabled or not, and updates toolbar in response to | 16 // wether Translate is enabled or not, and updates toolbar in response to |
17 // changes in state of translate. | 17 // changes in state of translate. |
18 class BrowserContentTranslateDriverObserver | 18 class BrowserContentTranslateDriverObserver |
19 : public ContentTranslateDriver::Observer { | 19 : public translate::ContentTranslateDriver::Observer { |
20 public: | 20 public: |
21 explicit BrowserContentTranslateDriverObserver(Browser* browser); | 21 explicit BrowserContentTranslateDriverObserver(Browser* browser); |
22 | 22 |
23 virtual ~BrowserContentTranslateDriverObserver(); | 23 virtual ~BrowserContentTranslateDriverObserver(); |
24 | 24 |
25 // Overridden from ContentTranslateDriver::Observer | 25 // Overridden from ContentTranslateDriver::Observer |
26 virtual void OnIsPageTranslatedChanged(content::WebContents* source) OVERRIDE; | 26 virtual void OnIsPageTranslatedChanged(content::WebContents* source) OVERRIDE; |
27 virtual void OnTranslateEnabledChanged(content::WebContents* source) OVERRIDE; | 27 virtual void OnTranslateEnabledChanged(content::WebContents* source) OVERRIDE; |
28 | 28 |
29 private: | 29 private: |
30 Browser* browser_; | 30 Browser* browser_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(BrowserContentTranslateDriverObserver); | 32 DISALLOW_COPY_AND_ASSIGN(BrowserContentTranslateDriverObserver); |
33 }; | 33 }; |
34 | 34 |
35 #endif // CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_ | 35 #endif // CHROME_BROWSER_UI_BROWSER_CONTENT_TRANSLATE_DRIVER_OBSERVER_H_ |
OLD | NEW |