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

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

Issue 2617493002: Revert "Show user menu on right-click of the avatar button when MaterialDesignUserMenu is enabled." (Closed)
Patch Set: Created 3 years, 11 months 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 d45dbb6c7712fefd4e2439c367d0a29299d2747d..4cb0ca6cf201d885d0c5d6d9755ad8245dc36ddc 100644
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -686,18 +686,14 @@ 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())) {
+ (!profiles::HasProfileSwitchTargets(browser->profile()) ||
+ switches::IsMaterialDesignUserMenu())) {
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