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

Issue 22597004: Move AvatarMenuModel::Item into ui/base. (Closed)

Created:
7 years, 4 months ago by calamity
Modified:
7 years, 2 months ago
CC:
chromium-reviews, tfarina, tapted, Robert Sesek
Base URL:
https://chromium.googlesource.com/chromium/src.git@le_refactor_gigante_2
Visibility:
Public.

Description

Move AvatarMenuModel::Item into ui/base. Moving this to enable the app list to reuse code from Chrome's profile switching menu. App List profile selector implementation is in https://codereview.chromium.org/20656002/ . BUG= TEST=None

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -95 lines) Patch
M chrome/browser/profiles/avatar_menu_model.h View 3 chunks +7 lines, -31 lines 0 comments Download
M chrome/browser/profiles/avatar_menu_model.cc View 4 chunks +8 lines, -43 lines 0 comments Download
M chrome/browser/profiles/avatar_menu_model_unittest.cc View 4 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/profiles/profile_info_util.h View 2 chunks +19 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_info_util.cc View 2 chunks +40 lines, -1 line 0 comments Download
M chrome/browser/ui/views/avatar_menu_bubble_view.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/profile_chooser_view.cc View 3 chunks +3 lines, -2 lines 0 comments Download
A ui/base/profile_selector/avatar_menu_item_model.h View 1 chunk +49 lines, -0 lines 0 comments Download
A ui/base/profile_selector/avatar_menu_item_model.cc View 1 chunk +23 lines, -0 lines 0 comments Download
M ui/ui.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
calamity
7 years, 4 months ago (2013-08-09 08:34:55 UTC) #1
xiyuan
Don't think AvatarMenuItemModel should live in ui/base as that dir is a place to put ...
7 years, 4 months ago (2013-08-09 17:15:47 UTC) #2
tfarina
On Fri, Aug 9, 2013 at 2:15 PM, <xiyuan@chromium.org> wrote: > Don't think AvatarMenuItemModel should ...
7 years, 4 months ago (2013-08-09 17:21:15 UTC) #3
xiyuan
On 2013/08/09 17:21:15, tfarina wrote: > There is even a TODO in both app_list_menu.h and ...
7 years, 4 months ago (2013-08-09 17:46:35 UTC) #4
calamity
On 2013/08/09 17:15:47, xiyuan wrote: > Don't think AvatarMenuItemModel should live in ui/base as that ...
7 years, 4 months ago (2013-08-13 07:46:07 UTC) #5
koz (OOO until 15th September)
7 years, 4 months ago (2013-08-16 04:52:15 UTC) #6
On 2013/08/13 07:46:07, calamity wrote:
> On 2013/08/09 17:15:47, xiyuan wrote:
> > Don't think AvatarMenuItemModel should live in ui/base as that dir is a
place
> to
> > put generic UI components. AvatarMenuItemModel does not fit into that
> category.
> > And it's strange that AvatarMenuItemModel is not sit together with its
> container
> > AvatarMenuModel.
> > 
> > I still think that AppListMenu and AppListMenuViews should be moved out of
> > ui/app_list and into chrome/browser/ui/app_list because that is chrome
> specific.
> > It should be exposed as ui::MenuModel* via AppListViewDelegate.
> > 
> > If we don't want to do the move now and still want to share
> AvatarMenuItemModel
> > code, I would suggest to expose the profile menu items via
AppListViewDelegate
> > rather then put it into AppListModel, e.g. have a
> > AppListViewDelegate::PopulateAvatarMenuItems and pass it the AppListMenu's
> > menu_model_ for updating. This should keep avatar menu stuff inside chrome.
> 
> I'm not sure how this would work. I don't think exposing ui::MenuModel* is
> enough 
> because AppListMenuViews has special presentation for some menu commands which
> is
> tightly coupled to the way the model is constructed.
> 
> More specifically, ui::MenuModel* isn't able to express the structure of the
> "current
> user" menu item so the AppListMenuViews and mac equivalent wait until they see
> the CURRENT_USER item id and take that as a cue to build a special item.
> 
> Do you have any suggestions?

I think Ben's suggestion of introducing a new item type rather than re-using
this one is a good idea.

Powered by Google App Engine
This is Rietveld 408576698