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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 53153009: When the new profile management flag is enabled, make sure to use the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use helper function Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698