Index: chrome/browser/ui/android/infobars/translate_compact_infobar.h |
diff --git a/chrome/browser/ui/android/infobars/translate_compact_infobar.h b/chrome/browser/ui/android/infobars/translate_compact_infobar.h |
index 90ebd30e6cdab9dd2cd0970c0614ea39a42af5ab..b9aa44ad6b1f24fc896f9a652c94f664742a0541 100644 |
--- a/chrome/browser/ui/android/infobars/translate_compact_infobar.h |
+++ b/chrome/browser/ui/android/infobars/translate_compact_infobar.h |
@@ -36,6 +36,9 @@ class TranslateCompactInfoBar |
int option, |
jboolean value); |
+ // Check whether we should automatically trigger "Always Translate" |
+ bool ShouldAutoAlwaysTranslate(); |
+ |
// ContentTranslateDriver::Observer implementation. |
void OnPageTranslated(const std::string& original_lang, |
const std::string& translated_lang, |
@@ -52,6 +55,10 @@ class TranslateCompactInfoBar |
translate::TranslateInfoBarDelegate* GetDelegate(); |
translate::ContentTranslateDriver* translate_driver_; |
+ // If number of consecutive translations is equal to this number, infobar will |
+ // automatically trigger "Always Translate" |
+ const int kAcceptCountThreshold = 5; |
+ |
DISALLOW_COPY_AND_ASSIGN(TranslateCompactInfoBar); |
}; |