| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 // several times). | 141 // several times). |
| 142 void AlwaysTranslatePageLanguage(); | 142 void AlwaysTranslatePageLanguage(); |
| 143 void NeverTranslatePageLanguage(); | 143 void NeverTranslatePageLanguage(); |
| 144 | 144 |
| 145 // The following methods are called by the infobar that displays the status | 145 // The following methods are called by the infobar that displays the status |
| 146 // while translating and also the one displaying the error message. | 146 // while translating and also the one displaying the error message. |
| 147 string16 GetMessageInfoBarText(); | 147 string16 GetMessageInfoBarText(); |
| 148 string16 GetMessageInfoBarButtonText(); | 148 string16 GetMessageInfoBarButtonText(); |
| 149 void MessageInfoBarButtonPressed(); | 149 void MessageInfoBarButtonPressed(); |
| 150 bool ShouldShowMessageInfoBarButton(); | 150 bool ShouldShowMessageInfoBarButton(); |
| 151 bool InTranslateNavigation(); | |
| 152 | 151 |
| 153 // Called by the before translate infobar to figure-out if it should show | 152 // Called by the before translate infobar to figure-out if it should show |
| 154 // an extra shortcut to let the user black-list/white-list that language | 153 // an extra shortcut to let the user black-list/white-list that language |
| 155 // (based on how many times the user accepted/declined translation). | 154 // (based on how many times the user accepted/declined translation). |
| 156 // The shortcut itself is platform specific, it can be a button or a new bar | 155 // The shortcut itself is platform specific, it can be a button or a new bar |
| 157 // for example. | 156 // for example. |
| 158 bool ShouldShowNeverTranslateShortcut(); | 157 bool ShouldShowNeverTranslateShortcut(); |
| 159 bool ShouldShowAlwaysTranslateShortcut(); | 158 bool ShouldShowAlwaysTranslateShortcut(); |
| 160 | 159 |
| 161 // Sets this infobar background animation based on the previous infobar shown. | 160 // Sets this infobar background animation based on the previous infobar shown. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 | 237 |
| 239 // The translation related preferences. | 238 // The translation related preferences. |
| 240 TranslatePrefs prefs_; | 239 TranslatePrefs prefs_; |
| 241 | 240 |
| 242 // Translation shortcut configuration | 241 // Translation shortcut configuration |
| 243 ShortcutConfiguration shortcut_config_; | 242 ShortcutConfiguration shortcut_config_; |
| 244 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 243 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 245 }; | 244 }; |
| 246 | 245 |
| 247 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ | 246 #endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |