diff options
author | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 21:27:22 +0000 |
---|---|---|
committer | stevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-08 21:27:22 +0000 |
commit | 6a26a905739eca0cf3777b032c81d8b3c49bb41b (patch) | |
tree | b384dc5a316c3496b443e4d0087b1062fe184c6e /ash/shell/app_list.cc | |
parent | a76f3e0dd50b85b58c87c432dd64d20680f9cfc8 (diff) | |
download | chromium_src-6a26a905739eca0cf3777b032c81d8b3c49bb41b.zip chromium_src-6a26a905739eca0cf3777b032c81d8b3c49bb41b.tar.gz chromium_src-6a26a905739eca0cf3777b032c81d8b3c49bb41b.tar.bz2 |
Move AppListModel::Users to AppListViewDelegate
This is some minor re-factoring to simplify AppListModel in preparation
for making it associated with a Profile for syncing. While not strictly
necessary, it is confusing to have a list of "Users" associated with a
model that describes the list of apps for a specific user. Also, the
list of Users is only used by AppListMenu and can be maintained by
AppListViewDelegate.
One side effect of this change is that views will not be notified if the
user list changes and therefore can not invalidate the menu. While this
could be addressed, it shoudln't generally be possible to add a user
while the app list UI is visible, so the added complexity did not seem
worth supporting a theoretical edge case.
BUG=315887
For ash/shell/app_list.cc:
TBR=jamescook@chromium.org
Review URL: https://codereview.chromium.org/63283003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233996 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell/app_list.cc')
-rw-r--r-- | ash/shell/app_list.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ash/shell/app_list.cc b/ash/shell/app_list.cc index 7dfd01d..1c76592 100644 --- a/ash/shell/app_list.cc +++ b/ash/shell/app_list.cc @@ -236,6 +236,10 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { // Nothing needs to be done. } + virtual const Users& GetUsers() const OVERRIDE { + return users_; + } + virtual void InitModel(app_list::AppListModel* model) OVERRIDE { model_ = model; PopulateApps(model_->item_list()); @@ -328,6 +332,7 @@ class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { } app_list::AppListModel* model_; + Users users_; DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate); }; |