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

Issue 7331017: Multi-Profiles: Add icon chooser to profiles menu (Closed)

Created:
9 years, 5 months ago by sail
Modified:
9 years, 5 months ago
CC:
chromium-reviews, dhollowa
Visibility:
Public.

Description

Multi-Profiles: Add icon chooser to profiles menu This change adds an icon chooser grid to the profiles menu. This is only implemented for toolkit views for now. Screenshots: http://www.dropmocks.com/mXGba BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91958

Patch Set 1 #

Patch Set 2 : remove debug code #

Total comments: 25

Patch Set 3 : clean up constructor #

Patch Set 4 : diff against parent branch #

Patch Set 5 : use menu model adapter #

Patch Set 6 : close menu on button pressed #

Total comments: 4

Patch Set 7 : Address review comments #

Total comments: 4

Patch Set 8 : address review comments #

Patch Set 9 : Multi-Profiles: Add icon chooser to profiles menu #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -75 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/profile_menu_model.h View 1 2 3 4 5 6 7 8 1 chunk +14 lines, -5 lines 0 comments Download
M chrome/browser/ui/profile_menu_model.cc View 1 2 3 4 5 6 7 8 7 chunks +28 lines, -22 lines 0 comments Download
A chrome/browser/ui/views/avatar_menu.h View 1 2 3 4 5 6 7 8 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/ui/views/avatar_menu.cc View 1 2 3 4 5 6 7 8 1 chunk +192 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/avatar_menu_button.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/avatar_menu_button.cc View 1 2 3 4 5 6 7 8 2 chunks +19 lines, -19 lines 0 comments Download
M chrome/browser/ui/views/frame/glass_browser_frame_view.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/frame/opaque_browser_frame_view.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M views/controls/menu/menu_item_view.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M views/controls/menu/menu_item_view.cc View 1 2 3 4 5 6 7 8 2 chunks +26 lines, -11 lines 0 comments Download
M views/controls/menu/menu_item_view_gtk.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M views/controls/menu/menu_item_view_win.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
sail
9 years, 5 months ago (2011-07-08 20:26:52 UTC) #1
sky
http://codereview.chromium.org/7331017/diff/2001/chrome/browser/ui/profile_menu_model.h File chrome/browser/ui/profile_menu_model.h (right): http://codereview.chromium.org/7331017/diff/2001/chrome/browser/ui/profile_menu_model.h#newcode27 chrome/browser/ui/profile_menu_model.h:27: enum { enums should be first in a section. ...
9 years, 5 months ago (2011-07-08 21:01:43 UTC) #2
sail
http://codereview.chromium.org/7331017/diff/2001/chrome/browser/ui/profile_menu_model.h File chrome/browser/ui/profile_menu_model.h (right): http://codereview.chromium.org/7331017/diff/2001/chrome/browser/ui/profile_menu_model.h#newcode27 chrome/browser/ui/profile_menu_model.h:27: enum { On 2011/07/08 21:01:44, sky wrote: > enums ...
9 years, 5 months ago (2011-07-08 21:53:57 UTC) #3
sky
http://codereview.chromium.org/7331017/diff/2001/chrome/browser/ui/views/avatar_menu.cc File chrome/browser/ui/views/avatar_menu.cc (right): http://codereview.chromium.org/7331017/diff/2001/chrome/browser/ui/views/avatar_menu.cc#newcode150 chrome/browser/ui/views/avatar_menu.cc:150: break; On 2011/07/08 21:53:57, sail wrote: > On 2011/07/08 ...
9 years, 5 months ago (2011-07-08 22:31:25 UTC) #4
sail
9 years, 5 months ago (2011-07-08 22:51:18 UTC) #5
sail
> CAncel will close the menu. Done, thanks!
9 years, 5 months ago (2011-07-08 22:51:34 UTC) #6
sky
LGTM http://codereview.chromium.org/7331017/diff/14/chrome/browser/ui/views/avatar_menu.cc File chrome/browser/ui/views/avatar_menu.cc (right): http://codereview.chromium.org/7331017/diff/14/chrome/browser/ui/views/avatar_menu.cc#newcode54 chrome/browser/ui/views/avatar_menu.cc:54: explicit AvatarIconGridView(Profile* profile, views::MenuItemView* menu); no explicit http://codereview.chromium.org/7331017/diff/14/chrome/browser/ui/views/avatar_menu_button.h ...
9 years, 5 months ago (2011-07-08 23:03:32 UTC) #7
sail
http://codereview.chromium.org/7331017/diff/14/chrome/browser/ui/views/avatar_menu.cc File chrome/browser/ui/views/avatar_menu.cc (right): http://codereview.chromium.org/7331017/diff/14/chrome/browser/ui/views/avatar_menu.cc#newcode54 chrome/browser/ui/views/avatar_menu.cc:54: explicit AvatarIconGridView(Profile* profile, views::MenuItemView* menu); On 2011/07/08 23:03:35, sky ...
9 years, 5 months ago (2011-07-08 23:07:55 UTC) #8
sky
On Fri, Jul 8, 2011 at 4:07 PM, <sail@chromium.org> wrote: > > http://codereview.chromium.org/7331017/diff/14/chrome/browser/ui/views/avatar_menu.cc > File ...
9 years, 5 months ago (2011-07-08 23:08:46 UTC) #9
Miranda Callahan
Code looks great -- just a question and a nit; but I have a concern ...
9 years, 5 months ago (2011-07-09 13:24:25 UTC) #10
sail
9 years, 5 months ago (2011-07-09 17:58:47 UTC) #11
> I would vote for the icon chooser to be under "customize profile..." -- I
don't
Hey Miranda, I agree with you that the current UI is confusing. I originally had
the icon chooser inside a submenu. See: http://www.dropmocks.com/mXG99

I thought moving to a top level would simply things but that doesn't seem to
have worked.

The first item in the menu is supposed to be the profile name. I think it's
really helpful to have it there. Do you think there's a way to make it clearer?
Maybe something like "Profile: Name of profile"

Also, I'll check in the UI as it is right now and send out a separate CL to fix
up the UI. Thanks.

http://codereview.chromium.org/7331017/diff/6005/chrome/browser/ui/views/avat...
File chrome/browser/ui/views/avatar_menu.cc (right):

http://codereview.chromium.org/7331017/diff/6005/chrome/browser/ui/views/avat...
chrome/browser/ui/views/avatar_menu.cc:90: dst_width = std::min(width(),
icon.width());
On 2011/07/09 13:24:26, Miranda Callahan wrote:
> Do you need a std::max of the dimension here (and in the else clause)?

the destination width can't be bigger than the width of the view. That's why
this has to be a minimum of the icon width or the view width.

http://codereview.chromium.org/7331017/diff/6005/chrome/browser/ui/views/avat...
File chrome/browser/ui/views/avatar_menu_button.h (right):

http://codereview.chromium.org/7331017/diff/6005/chrome/browser/ui/views/avat...
chrome/browser/ui/views/avatar_menu_button.h:29: // Creates a new button. If
|has_menu| is truen then clicking on the button
On 2011/07/09 13:24:26, Miranda Callahan wrote:
> s/truen/true

Done.

Powered by Google App Engine
This is Rietveld 408576698