OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_TAB_CONTENTS_LANGUAGE_STATE_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_LANGUAGE_STATE_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_LANGUAGE_STATE_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_LANGUAGE_STATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "chrome/browser/tab_contents/navigation_controller.h" | 12 #include "content/browser/tab_contents/navigation_controller.h" |
13 | 13 |
14 // This class holds the language state of the current page. | 14 // This class holds the language state of the current page. |
15 // There is one LanguageState instance per TabContents. | 15 // There is one LanguageState instance per TabContents. |
16 // It is used to determine when navigating to a new page whether it should | 16 // It is used to determine when navigating to a new page whether it should |
17 // automatically be translated. | 17 // automatically be translated. |
18 // This auto-translate behavior is the expected behavior when: | 18 // This auto-translate behavior is the expected behavior when: |
19 // - user is on page in language A that they had translated to language B. | 19 // - 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 | 20 // - user clicks a link in that page that takes them to a page also in language |
21 // A. | 21 // A. |
22 | 22 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // for example). This is necessary as a new infobar could be shown if a new | 99 // for example). This is necessary as a new infobar could be shown if a new |
100 // load happens in the page after the user closed the infobar. | 100 // load happens in the page after the user closed the infobar. |
101 bool translation_declined_; | 101 bool translation_declined_; |
102 | 102 |
103 // Whether the current navigation is a fragment navigation (in page). | 103 // Whether the current navigation is a fragment navigation (in page). |
104 bool in_page_navigation_; | 104 bool in_page_navigation_; |
105 | 105 |
106 DISALLOW_COPY_AND_ASSIGN(LanguageState); | 106 DISALLOW_COPY_AND_ASSIGN(LanguageState); |
107 }; | 107 }; |
108 | 108 |
109 #endif // CHROME_BROWSER_TAB_CONTENTS_LANGUAGE_STATE_H_ | 109 #endif // CONTENT_BROWSER_TAB_CONTENTS_LANGUAGE_STATE_H_ |
110 | |
OLD | NEW |