Index: chrome/browser/ui/views/profiles/new_avatar_button.cc |
diff --git a/chrome/browser/ui/views/profiles/new_avatar_button.cc b/chrome/browser/ui/views/profiles/new_avatar_button.cc |
index 0fa981f6ef08fb36f9c2566b4ac52aaac0c5089a..d5a10a5d0da8b3076d7e724afba526911178f249 100644 |
--- a/chrome/browser/ui/views/profiles/new_avatar_button.cc |
+++ b/chrome/browser/ui/views/profiles/new_avatar_button.cc |
@@ -120,8 +120,14 @@ NewAvatarButton::~NewAvatarButton() { |
} |
bool NewAvatarButton::OnMousePressed(const ui::MouseEvent& event) { |
- // Prevent the bubble from being re-shown if it's already showing. |
- suppress_mouse_released_action_ = ProfileChooserView::IsShowing(); |
+ // Prevent the bubble from being re-shown if it's already showing in current |
msw
2015/05/19 22:57:48
nit: "in the current"
gogerald1
2015/05/19 23:35:13
Done.
|
+ // browser and Hide it if it's showing in another browser. |
+ ProfileChooserView::ShowingType show_type = |
+ ProfileChooserView::IsShowingInBrowser(browser_); |
+ if (show_type == ProfileChooserView::IS_SHOWING) |
+ suppress_mouse_released_action_ = true; |
+ else if (show_type == ProfileChooserView::IS_SHOWING_IN_ANOTHER_BROWSER) |
+ ProfileChooserView::Hide(); |
return LabelButton::OnMousePressed(event); |
} |