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

Issue 117533002: [Mac] Redesign of the avatar menu button (Closed)

Created:
7 years ago by noms (inactive)
Modified:
6 years, 11 months ago
Reviewers:
Nico
CC:
chromium-reviews
Visibility:
Public.

Description

[Mac] Redesign of the avatar menu button. - Made the (old) avatar icon badge be a subclass of the (future, new in this CL) avatar button, and moved the common code (opening the avatar bubble, listening to profile changes) up in the parent class. - Made this class use a ProfileInfoCacheObserver rather than the NotificationService - Added unit tests for the new code - Small change in c/b/ui/views/frame/browser_view.cc to re-use a new method in profiles_state.cc that checks whether a profile is a normal/guest mode profile (i.e. not incognito) Screenshots: https://drive.google.com/folderview?id=0B1B1Up4p2NRMUW5zeFp6MkY5UDA&usp=sharing This is behind the --new-profile-management flag, and shows the avatar switcher as a menu button in the caption area. The button shows the user's name, rather than an image. BUG=324036 TEST=With the --new-profile-management flag on, start Chrome. Whether you have one user or more, you should see a button in the top right corner of the browser displaying the active profile's name. The guest browser should display "Guest", and the button should work otherwise as the existing avatar icon. In incognito mode, the spy dude icon should be displayed as before. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246700

Patch Set 1 : #

Patch Set 2 : fix tabstrip width #

Total comments: 9

Patch Set 3 : prettify ALL the things! #

Patch Set 4 : . #

Total comments: 12

Patch Set 5 : rebase #

Patch Set 6 : now with less incorrect usage of initializers #

Total comments: 10

Patch Set 7 : rebase #

Patch Set 8 : nico review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+436 lines, -606 lines) Patch
M chrome/browser/profiles/profiles_state.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profiles_state.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/browser/avatar_base_controller.h View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/browser/avatar_base_controller.mm View 1 2 3 4 5 6 7 1 chunk +163 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/avatar_button_controller.h View 1 2 3 4 5 2 chunks +6 lines, -46 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/avatar_button_controller.mm View 1 2 3 4 5 6 7 1 chunk +40 lines, -318 lines 0 comments Download
M chrome/browser/ui/cocoa/browser/avatar_button_controller_unittest.mm View 1 2 3 4 5 6 7 3 chunks +16 lines, -63 lines 0 comments Download
A chrome/browser/ui/cocoa/browser/avatar_icon_controller.h View 1 2 3 4 5 1 chunk +38 lines, -0 lines 0 comments Download
A + chrome/browser/ui/cocoa/browser/avatar_icon_controller.mm View 1 2 3 4 5 10 chunks +12 lines, -132 lines 0 comments Download
A + chrome/browser/ui/cocoa/browser/avatar_icon_controller_unittest.mm View 1 2 7 chunks +13 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 4 chunks +12 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 6 chunks +21 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 1 2 3 4 5 6 5 chunks +39 lines, -14 lines 0 comments Download
M chrome/browser/ui/cocoa/framed_browser_window.mm View 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 2 chunks +5 lines, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
noms (inactive)
Hiya Nico, This CL changes the avatar icon into a button, behind the --new-profile-management flag. ...
6 years, 11 months ago (2014-01-07 22:20:06 UTC) #1
Nico
Huh, this is a bit surprising: We used to have these buttons originally, and then ...
6 years, 11 months ago (2014-01-07 23:09:22 UTC) #2
Nico
How long do you expect the two avatar buttons to coexist? If only a short ...
6 years, 11 months ago (2014-01-07 23:20:33 UTC) #3
noms (inactive)
Just a round of answers/attempts to clarify things before I actually touch any code. This ...
6 years, 11 months ago (2014-01-08 15:05:30 UTC) #4
Nico
Ok. On Wed, Jan 8, 2014 at 7:05 AM, <noms@chromium.org> wrote: > Just a round ...
6 years, 11 months ago (2014-01-08 19:01:50 UTC) #5
noms (inactive)
Holy refactoring Batman! I've made the (old) icon badge a subclass of the (new) just-the-profile-name ...
6 years, 11 months ago (2014-01-09 23:14:53 UTC) #6
noms (inactive)
ping :)
6 years, 11 months ago (2014-01-13 21:13:38 UTC) #7
Nico
Much better! https://codereview.chromium.org/117533002/diff/570001/chrome/browser/profiles/profiles_state.cc File chrome/browser/profiles/profiles_state.cc (right): https://codereview.chromium.org/117533002/diff/570001/chrome/browser/profiles/profiles_state.cc#newcode106 chrome/browser/profiles/profiles_state.cc:106: return (profile->IsGuestSession() || !profile->IsOffTheRecord()); nit: no parens ...
6 years, 11 months ago (2014-01-14 03:56:02 UTC) #8
noms (inactive)
https://codereview.chromium.org/117533002/diff/570001/chrome/browser/profiles/profiles_state.cc File chrome/browser/profiles/profiles_state.cc (right): https://codereview.chromium.org/117533002/diff/570001/chrome/browser/profiles/profiles_state.cc#newcode106 chrome/browser/profiles/profiles_state.cc:106: return (profile->IsGuestSession() || !profile->IsOffTheRecord()); On 2014/01/14 03:56:02, Nico wrote: ...
6 years, 11 months ago (2014-01-15 22:07:46 UTC) #9
noms (inactive)
pong
6 years, 11 months ago (2014-01-21 21:33:04 UTC) #10
Nico
lgtm, some optional comments below (the last one is a tiny bit larger; maybe you ...
6 years, 11 months ago (2014-01-23 00:51:33 UTC) #11
noms (inactive)
Thanks Nico! Addressed all but the bigger comment -- I'll take a look at it ...
6 years, 11 months ago (2014-01-23 18:24:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/noms@chromium.org/117533002/1280003
6 years, 11 months ago (2014-01-23 18:26:26 UTC) #13
commit-bot: I haz the power
6 years, 11 months ago (2014-01-23 22:12:15 UTC) #14
Message was sent while issue was closed.
Change committed as 246700

Powered by Google App Engine
This is Rietveld 408576698