Index: chrome/browser/ui/views/frame/browser_view.cc |
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
index 6c5227623f475ccc76a017bdae277ab60fe43078..6085041dd5ca0ffad5d443e9ac34f25c106542fd 100644 |
--- a/chrome/browser/ui/views/frame/browser_view.cc |
+++ b/chrome/browser/ui/views/frame/browser_view.cc |
@@ -27,6 +27,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_info_cache.h" |
#include "chrome/browser/profiles/profile_manager.h" |
+#include "chrome/browser/profiles/profiles_state.h" |
#include "chrome/browser/search/search.h" |
#include "chrome/browser/sessions/tab_restore_service.h" |
#include "chrome/browser/sessions/tab_restore_service_factory.h" |
@@ -2573,9 +2574,18 @@ void BrowserView::ShowAvatarBubble(WebContents* web_contents, |
} |
void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
- AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
- if (button) |
- button->ShowAvatarBubble(); |
+ if (profiles::IsNewProfileManagementEnabled()) { |
+ NewAvatarButton* button = frame_->GetNewAvatarMenuButton(); |
+ if (button) { |
+ ui::MouseEvent mouse_event(ui::ET_MOUSE_RELEASED, gfx::Point(), |
+ gfx::Point(), ui::EF_LEFT_MOUSE_BUTTON); |
+ button->OnMouseReleased(mouse_event); |
sky
2013/11/04 22:18:53
We shouldn't be faking events like this to trigger
Roger Tawa OOO till Jul 10th
2013/11/05 00:27:33
Done.
|
+ } |
+ } else { |
+ AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
+ if (button) |
+ button->ShowAvatarBubble(); |
+ } |
} |
void BrowserView::ShowPasswordGenerationBubble( |