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

Unified Diff: chrome/browser/ui/views/translate/translate_bubble_view.cc

Issue 1402363013: Update location bar bubble/icon behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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: chrome/browser/ui/views/translate/translate_bubble_view.cc
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.cc b/chrome/browser/ui/views/translate/translate_bubble_view.cc
index 30694759de4f19816f97559803c91bc48541eed3..c8689b171040e52d39761275f62e6086a947bb1f 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.cc
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc
@@ -78,7 +78,7 @@ void TranslateBubbleView::ShowBubble(
content::WebContents* web_contents,
translate::TranslateStep step,
translate::TranslateErrors::Type error_type,
- bool is_user_gesture) {
+ DisplayReason reason) {
if (translate_bubble_view_) {
// When the user reads the advanced setting panel, the bubble should not be
// changed because they are focusing on the bubble.
@@ -97,7 +97,7 @@ void TranslateBubbleView::ShowBubble(
return;
} else {
if (step == translate::TRANSLATE_STEP_AFTER_TRANSLATE &&
- !is_user_gesture) {
+ reason == AUTOMATIC) {
return;
}
}
@@ -119,10 +119,8 @@ void TranslateBubbleView::ShowBubble(
model.Pass(),
error_type,
web_contents);
- if (is_user_gesture)
- views::BubbleDelegateView::CreateBubble(view)->Show();
- else
- views::BubbleDelegateView::CreateBubble(view)->ShowInactive();
+ views::BubbleDelegateView::CreateBubble(view);
+ view->ShowForReason(reason);
}
// static
« no previous file with comments | « chrome/browser/ui/views/translate/translate_bubble_view.h ('k') | chrome/browser/ui/views/translate/translate_icon_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698