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

Unified Diff: chrome/browser/ui/views/profiles/profile_chooser_view.cc

Issue 2478523003: Show user menu on right-click of the avatar button when MaterialDesignUserMenu is enabled. (Closed)
Patch Set: Created 4 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 | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('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/profiles/profile_chooser_view.cc
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
index c120740e4149a7765fb2e2cf9eb3a5aed2f9989e..cc2369d82e2c002faa0d8e0a59a69221099aefee 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -698,14 +698,18 @@ void ProfileChooserView::ShowBubble(
signin_metrics::AccessPoint access_point,
views::View* anchor_view,
Browser* browser) {
+ if (switches::IsMaterialDesignUserMenu()) {
+ // The Material Design User Menu doesn't have a fast user switcher on
+ // right-click. To ease up the transition for users, show the regular user
+ // menu when right-clicking instead of doing nothing.
+ view_mode = profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
+ }
+
// Don't start creating the view if it would be an empty fast user switcher.
// It has to happen here to prevent the view system from creating an empty
// container.
- // Same for material design user menu since fast profile switcher will be
- // migrated to the left-click menu.
if (view_mode == profiles::BUBBLE_VIEW_MODE_FAST_PROFILE_CHOOSER &&
- (!profiles::HasProfileSwitchTargets(browser->profile()) ||
- switches::IsMaterialDesignUserMenu())) {
+ !profiles::HasProfileSwitchTargets(browser->profile())) {
return;
}
« no previous file with comments | « chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698