| 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_CORE_BROWSER_LANGUAGE_STATE_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_LANGUAGE_STATE_H_ |
| 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_LANGUAGE_STATE_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_LANGUAGE_STATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 namespace translate { |
| 13 |
| 12 class TranslateDriver; | 14 class TranslateDriver; |
| 13 | 15 |
| 14 // This class holds the language state of the current page. | 16 // This class holds the language state of the current page. |
| 15 // There is one LanguageState instance per tab. | 17 // There is one LanguageState instance per tab. |
| 16 // It is used to determine when navigating to a new page whether it should | 18 // It is used to determine when navigating to a new page whether it should |
| 17 // automatically be translated. | 19 // automatically be translated. |
| 18 // This auto-translate behavior is the expected behavior when: | 20 // This auto-translate behavior is the expected behavior when: |
| 19 // - user is on page in language A that they had translated to language B. | 21 // - user is on page in language A that they had translated to language B. |
| 20 // - user clicks a link in that page that takes them to a page also in language | 22 // - user clicks a link in that page that takes them to a page also in language |
| 21 // A. | 23 // A. |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 116 |
| 115 // Whether the current navigation is a fragment navigation (in page). | 117 // Whether the current navigation is a fragment navigation (in page). |
| 116 bool in_page_navigation_; | 118 bool in_page_navigation_; |
| 117 | 119 |
| 118 // Whether the Translate is enabled. | 120 // Whether the Translate is enabled. |
| 119 bool translate_enabled_; | 121 bool translate_enabled_; |
| 120 | 122 |
| 121 DISALLOW_COPY_AND_ASSIGN(LanguageState); | 123 DISALLOW_COPY_AND_ASSIGN(LanguageState); |
| 122 }; | 124 }; |
| 123 | 125 |
| 126 } // namespace translate |
| 127 |
| 124 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_LANGUAGE_STATE_H_ | 128 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_LANGUAGE_STATE_H_ |
| OLD | NEW |