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

Unified Diff: components/translate/core/browser/translate_infobar_delegate.cc

Issue 2788343002: Translate page in the new UI. (Closed)
Patch Set: refactor Created 3 years, 9 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
Index: components/translate/core/browser/translate_infobar_delegate.cc
diff --git a/components/translate/core/browser/translate_infobar_delegate.cc b/components/translate/core/browser/translate_infobar_delegate.cc
index 070a3191b87b22f1a819a92b90b132587194079d..c945a5c692d9ee1ce8b7912fdd1fc78cefc2944b 100644
--- a/components/translate/core/browser/translate_infobar_delegate.cc
+++ b/components/translate/core/browser/translate_infobar_delegate.cc
@@ -104,7 +104,7 @@ void TranslateInfoBarDelegate::Create(
old_infobar = infobar_manager->infobar_at(i);
old_delegate = old_infobar->delegate()->AsTranslateInfoBarDelegate();
if (old_delegate) {
- if (!replace_existing_infobar)
+ if (!replace_existing_infobar || IsCompactUIEnabled())
return;
break;
}
@@ -143,6 +143,8 @@ void TranslateInfoBarDelegate::Translate() {
void TranslateInfoBarDelegate::RevertTranslation() {
ui_delegate_.RevertTranslation();
+ if (IsCompactUIEnabled())
+ return;
infobar()->RemoveSelf();
}

Powered by Google App Engine
This is Rietveld 408576698