| 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_TRANSLATE_INFOBAR_DELEGATE_H_ | 5 #ifndef COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
| 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 6 #define COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 virtual void TranslationDeclined(); | 139 virtual void TranslationDeclined(); |
| 140 | 140 |
| 141 // Methods called by the Options menu delegate. | 141 // Methods called by the Options menu delegate. |
| 142 virtual bool IsTranslatableLanguageByPrefs(); | 142 virtual bool IsTranslatableLanguageByPrefs(); |
| 143 virtual void ToggleTranslatableLanguageByPrefs(); | 143 virtual void ToggleTranslatableLanguageByPrefs(); |
| 144 virtual bool IsSiteBlacklisted(); | 144 virtual bool IsSiteBlacklisted(); |
| 145 virtual void ToggleSiteBlacklist(); | 145 virtual void ToggleSiteBlacklist(); |
| 146 virtual bool ShouldAlwaysTranslate(); | 146 virtual bool ShouldAlwaysTranslate(); |
| 147 virtual void ToggleAlwaysTranslate(); | 147 virtual void ToggleAlwaysTranslate(); |
| 148 | 148 |
| 149 int GetTranslationAcceptedCount(); |
| 150 |
| 149 // Methods called by the extra-buttons that can appear on the "before | 151 // Methods called by the extra-buttons that can appear on the "before |
| 150 // translate" infobar (when the user has accepted/declined the translation | 152 // translate" infobar (when the user has accepted/declined the translation |
| 151 // several times). | 153 // several times). |
| 152 void AlwaysTranslatePageLanguage(); | 154 void AlwaysTranslatePageLanguage(); |
| 153 void NeverTranslatePageLanguage(); | 155 void NeverTranslatePageLanguage(); |
| 154 | 156 |
| 155 // The following methods are called by the infobar that displays the status | 157 // The following methods are called by the infobar that displays the status |
| 156 // while translating and also the one displaying the error message. | 158 // while translating and also the one displaying the error message. |
| 157 base::string16 GetMessageInfoBarText(); | 159 base::string16 GetMessageInfoBarText(); |
| 158 base::string16 GetMessageInfoBarButtonText(); | 160 base::string16 GetMessageInfoBarButtonText(); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 234 |
| 233 // Whether the translation was triggered via a menu click vs automatically | 235 // Whether the translation was triggered via a menu click vs automatically |
| 234 // (due to language detection, preferences...) | 236 // (due to language detection, preferences...) |
| 235 bool triggered_from_menu_; | 237 bool triggered_from_menu_; |
| 236 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 238 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 237 }; | 239 }; |
| 238 | 240 |
| 239 } // namespace translate | 241 } // namespace translate |
| 240 | 242 |
| 241 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 243 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |