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

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: Address review comments 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
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..4b7c6ebdc7299a6a54d84b652b5b61e4eb00b920 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"
@@ -77,6 +78,7 @@
#include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
#include "chrome/browser/ui/views/omnibox/omnibox_views.h"
#include "chrome/browser/ui/views/password_generation_bubble_view.h"
+#include "chrome/browser/ui/views/profile_chooser_view.h"
#include "chrome/browser/ui/views/status_bubble_views.h"
#include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h"
#include "chrome/browser/ui/views/tabs/tab.h"
@@ -2573,9 +2575,22 @@ 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) {
sky 2013/11/05 20:24:29 Under what conditions can we end up here and there
Roger Tawa OOO till Jul 10th 2013/11/05 20:53:12 With the new profile management flag enabled, this
+ gfx::Point origin;
+ views::View::ConvertPointToScreen(button, &origin);
+ gfx::Rect bounds(origin, size());
+
+ ProfileChooserView::ShowBubble(
+ button, views::BubbleBorder::TOP_RIGHT,
+ views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE, bounds, browser());
+ }
+ } else {
+ AvatarMenuButton* button = frame_->GetAvatarMenuButton();
+ if (button)
+ button->ShowAvatarBubble();
+ }
}
void BrowserView::ShowPasswordGenerationBubble(

Powered by Google App Engine
This is Rietveld 408576698