[email protected] | e625b760 | 2013-10-28 09:24:56 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_UI_BROWSER_LANGUAGE_STATE_OBSERVER_H_ |
| 6 | #define CHROME_BROWSER_UI_BROWSER_LANGUAGE_STATE_OBSERVER_H_ |
| 7 | |
| 8 | #include "chrome/browser/tab_contents/language_state_observer.h" |
| 9 | |
| 10 | #include "base/basictypes.h" |
| 11 | #include "base/compiler_specific.h" |
| 12 | |
| 13 | class Browser; |
| 14 | |
| 15 | // Implementation of LanguageStateObserver for Browser. This observes the state |
| 16 | // if Translate is enabled or not, and updates toolbar in response to changes in |
| 17 | // state of translate. |
| 18 | class BrowserLanguageStateObserver : public LanguageStateObserver { |
| 19 | public: |
| 20 | explicit BrowserLanguageStateObserver(Browser* browser); |
| 21 | |
| 22 | virtual ~BrowserLanguageStateObserver(); |
| 23 | |
| 24 | // Overridden from LanguageState::Observer |
[email protected] | 3917f82a | 2013-11-21 06:25:54 | [diff] [blame] | 25 | virtual void OnIsPageTranslatedChanged(content::WebContents* source) OVERRIDE; |
[email protected] | e625b760 | 2013-10-28 09:24:56 | [diff] [blame] | 26 | virtual void OnTranslateEnabledChanged(content::WebContents* source) OVERRIDE; |
| 27 | |
| 28 | private: |
| 29 | Browser* browser_; |
| 30 | |
| 31 | DISALLOW_COPY_AND_ASSIGN(BrowserLanguageStateObserver); |
| 32 | }; |
| 33 | |
| 34 | #endif // CHROME_BROWSER_UI_BROWSER_LANGUAGE_STATE_OBSERVER_H_ |