OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // several times). | 139 // several times). |
140 void AlwaysTranslatePageLanguage(); | 140 void AlwaysTranslatePageLanguage(); |
141 void NeverTranslatePageLanguage(); | 141 void NeverTranslatePageLanguage(); |
142 | 142 |
143 // The following methods are called by the infobar that displays the status | 143 // The following methods are called by the infobar that displays the status |
144 // while translating and also the one displaying the error message. | 144 // while translating and also the one displaying the error message. |
145 string16 GetMessageInfoBarText(); | 145 string16 GetMessageInfoBarText(); |
146 string16 GetMessageInfoBarButtonText(); | 146 string16 GetMessageInfoBarButtonText(); |
147 void MessageInfoBarButtonPressed(); | 147 void MessageInfoBarButtonPressed(); |
148 bool ShouldShowMessageInfoBarButton(); | 148 bool ShouldShowMessageInfoBarButton(); |
| 149 bool InTranslateNavigation(); |
149 | 150 |
150 // Called by the before translate infobar to figure-out if it should show | 151 // Called by the before translate infobar to figure-out if it should show |
151 // an extra shortcut to let the user black-list/white-list that language | 152 // an extra shortcut to let the user black-list/white-list that language |
152 // (based on how many times the user accepted/declined translation). | 153 // (based on how many times the user accepted/declined translation). |
153 // The shortcut itself is platform specific, it can be a button or a new bar | 154 // The shortcut itself is platform specific, it can be a button or a new bar |
154 // for example. | 155 // for example. |
155 bool ShouldShowNeverTranslateShortcut(); | 156 bool ShouldShowNeverTranslateShortcut(); |
156 bool ShouldShowAlwaysTranslateShortcut(); | 157 bool ShouldShowAlwaysTranslateShortcut(); |
157 | 158 |
158 // Sets this infobar background animation based on the previous infobar shown. | 159 // Sets this infobar background animation based on the previous infobar shown. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 230 |
230 // The translation related preferences. | 231 // The translation related preferences. |
231 TranslatePrefs prefs_; | 232 TranslatePrefs prefs_; |
232 | 233 |
233 // Translation shortcut configuration | 234 // Translation shortcut configuration |
234 ShortcutConfiguration shortcut_config_; | 235 ShortcutConfiguration shortcut_config_; |
235 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 236 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
236 }; | 237 }; |
237 | 238 |
238 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 239 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
OLD | NEW |