Chromium Code Reviews| Index: chrome/browser/tab_contents/language_state.h |
| diff --git a/chrome/browser/tab_contents/language_state.h b/chrome/browser/tab_contents/language_state.h |
| index b5ac059c29f4c0e1c831066b95c5ce5fe1c230f4..9b170f2709ea52dc2e85598d460575c9e5df785d 100644 |
| --- a/chrome/browser/tab_contents/language_state.h |
| +++ b/chrome/browser/tab_contents/language_state.h |
| @@ -9,9 +9,12 @@ |
| #include "base/basictypes.h" |
| +class LanguageStateObserver; |
| + |
| namespace content { |
| -class NavigationController; |
| struct LoadCommittedDetails; |
| +class NavigationController; |
| +class WebContents; |
| } |
| // This class holds the language state of the current page. |
| @@ -71,6 +74,15 @@ class LanguageState { |
| // navigation. |
| bool in_page_navigation() const { return in_page_navigation_; } |
| + bool translate_enabled() const { return translate_enabled_; } |
| + void SetTranslateEnabled(bool value); |
|
sky
2013/10/22 16:09:22
Document the behavior of this. In particular that
hajimehoshi
2013/10/23 10:45:09
Done.
|
| + |
| + // Whether the current page's language is different from the previous |
| + // language. |
| + bool HasLanguageChanged() const; |
| + |
| + void set_observer(LanguageStateObserver* observer) { observer_ = observer; } |
| + |
| private: |
| // The languages this page is in. Note that current_lang_ is different from |
| // original_lang_ when the page has been translated. |
| @@ -109,6 +121,11 @@ class LanguageState { |
| // Whether the current navigation is a fragment navigation (in page). |
| bool in_page_navigation_; |
| + // Whether the Translate is enabled. |
| + bool translate_enabled_; |
| + |
| + LanguageStateObserver* observer_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(LanguageState); |
| }; |