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

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

Issue 420713003: Translate: Don't show 'Translated' bubble when the user dismisses the bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cocoa Created 6 years, 5 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/ui/views/translate/translate_bubble_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7df866f2e3016348c5696baaa4e942489f9a3909..b79511690abcdd1123484ebd86e012950847a3c8 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.cc
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc
@@ -84,7 +84,8 @@ void TranslateBubbleView::ShowBubble(
views::View* anchor_view,
content::WebContents* web_contents,
translate::TranslateStep step,
- translate::TranslateErrors::Type error_type) {
+ translate::TranslateErrors::Type error_type,
+ bool is_user_gesture) {
if (IsShowing()) {
// When the user reads the advanced setting panel, the bubble should not be
// changed because he/she is focusing on the bubble.
@@ -101,6 +102,11 @@ void TranslateBubbleView::ShowBubble(
translate_bubble_view_->SwitchToErrorView(error_type);
}
return;
+ } else {
+ if (step == translate::TRANSLATE_STEP_AFTER_TRANSLATE &&
+ !is_user_gesture) {
+ return;
+ }
}
std::string source_language;
« no previous file with comments | « chrome/browser/ui/views/translate/translate_bubble_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698