| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 // Called by the before translate infobar to figure-out if it should show | 162 // Called by the before translate infobar to figure-out if it should show |
| 163 // an extra shortcut to let the user black-list/white-list that language | 163 // an extra shortcut to let the user black-list/white-list that language |
| 164 // (based on how many times the user accepted/declined translation). | 164 // (based on how many times the user accepted/declined translation). |
| 165 // The shortcut itself is platform specific, it can be a button or a new bar | 165 // The shortcut itself is platform specific, it can be a button or a new bar |
| 166 // for example. | 166 // for example. |
| 167 bool ShouldShowNeverTranslateShortcut(); | 167 bool ShouldShowNeverTranslateShortcut(); |
| 168 bool ShouldShowAlwaysTranslateShortcut(); | 168 bool ShouldShowAlwaysTranslateShortcut(); |
| 169 | 169 |
| 170 // Called by translate compact infobar. This check whether we should | 170 // Called by translate compact infobar. This check whether we should |
| 171 // automatically trigger "Always Translate". | 171 // automatically trigger "Always Translate" or "Never Translate". |
| 172 bool ShouldAutoAlwaysTranslate(); | 172 bool ShouldAutoAlwaysTranslate(); |
| 173 bool ShouldAutoNeverTranslate(); |
| 173 | 174 |
| 174 #if defined(OS_IOS) | 175 #if defined(OS_IOS) |
| 175 // Shows the Infobar offering to never translate the language or the site. | 176 // Shows the Infobar offering to never translate the language or the site. |
| 176 void ShowNeverTranslateInfobar(); | 177 void ShowNeverTranslateInfobar(); |
| 177 #endif | 178 #endif |
| 178 | 179 |
| 179 // Adds the strings that should be displayed in the after translate infobar to | 180 // Adds the strings that should be displayed in the after translate infobar to |
| 180 // |strings|. If |autodetermined_source_language| is false, the text in that | 181 // |strings|. If |autodetermined_source_language| is false, the text in that |
| 181 // infobar is: | 182 // infobar is: |
| 182 // "The page has been translated from <lang1> to <lang2>." | 183 // "The page has been translated from <lang1> to <lang2>." |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 237 |
| 237 // Whether the translation was triggered via a menu click vs automatically | 238 // Whether the translation was triggered via a menu click vs automatically |
| 238 // (due to language detection, preferences...) | 239 // (due to language detection, preferences...) |
| 239 bool triggered_from_menu_; | 240 bool triggered_from_menu_; |
| 240 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); | 241 DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); |
| 241 }; | 242 }; |
| 242 | 243 |
| 243 } // namespace translate | 244 } // namespace translate |
| 244 | 245 |
| 245 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ | 246 #endif // COMPONENTS_TRANSLATE_CORE_BROWSER_TRANSLATE_INFOBAR_DELEGATE_H_ |
| OLD | NEW |