Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(760)

Unified Diff: chrome/browser/translate/translate_infobar_delegate.cc

Issue 14392011: [Translate] Expose whether the user is within a navigation session as part of the infobar delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/translate/translate_infobar_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_infobar_delegate.cc
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index b09a7cb2dc2b294005019f09a10fd4786ffe4da3..01502ffb25b829dd62945ece8fe23161d3d8c839 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -113,6 +113,14 @@ void TranslateInfoBarDelegate::TranslationDeclined() {
UMA_HISTOGRAM_COUNTS("Translate.DeclineTranslate", 1);
}
+bool TranslateInfoBarDelegate::InTranslateNavigation() {
+ TranslateTabHelper* translate_tab_helper =
+ TranslateTabHelper::FromWebContents(web_contents());
+ if (!translate_tab_helper)
+ return false;
+ return translate_tab_helper->language_state().InTranslateNavigation();
+}
+
bool TranslateInfoBarDelegate::IsLanguageBlacklisted() {
return prefs_.IsLanguageBlacklisted(original_language_code());
}
« no previous file with comments | « chrome/browser/translate/translate_infobar_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698