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

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

Issue 2074913002: Enable the translate bubble to be dismissed when user ignores it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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') | no next file » | 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 f32b95cddd189a8bf3d3b052e34010a3e82f3b81..9726e774b7812db4bce2278573591ca0e38b55ab 100644
--- a/chrome/browser/ui/views/translate/translate_bubble_view.cc
+++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc
@@ -171,6 +171,11 @@ TranslateBubbleView* TranslateBubbleView::GetCurrentBubble() {
return translate_bubble_view_;
}
+void TranslateBubbleView::CloseBubble() {
+ mouse_handler_.reset();
+ LocationBarBubbleDelegateView::CloseBubble();
+}
+
void TranslateBubbleView::Init() {
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
@@ -375,6 +380,8 @@ TranslateBubbleView::TranslateBubbleView(
is_in_incognito_window_(
web_contents && web_contents->GetBrowserContext()->IsOffTheRecord()) {
translate_bubble_view_ = this;
+ if (web_contents) // web_contents can be null in unit_tests.
+ mouse_handler_.reset(new WebContentMouseHandler(this, web_contents));
}
views::View* TranslateBubbleView::GetCurrentView() const {
« no previous file with comments | « chrome/browser/ui/views/translate/translate_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698