Chromium Code Reviews| Index: ash/app_list/app_list_model.h |
| diff --git a/ash/app_list/app_list_model.h b/ash/app_list/app_list_model.h |
| index bb797a16e4f6a0787842c21a3b4ff4ab3b10bf8e..fdf5ec296f04aa29c8f913d1c7dcb92f011c6d53 100644 |
| --- a/ash/app_list/app_list_model.h |
| +++ b/ash/app_list/app_list_model.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -6,7 +6,7 @@ |
| #define ASH_APP_LIST_APP_LIST_MODEL_H_ |
| #pragma once |
| -#include "ash/app_list/app_list_item_group_model.h" |
| +#include "ash/app_list/app_list_item_model.h" |
| #include "base/basictypes.h" |
| #include "ash/ash_export.h" |
| #include "ui/base/models/list_model.h" |
| @@ -17,21 +17,23 @@ namespace ash { |
| // which in turn owns a list of AppListItemModels. |
| class ASH_EXPORT AppListModel { |
| public: |
| + typedef ui::ListModel<AppListItemModel> Items; |
|
sky
2012/03/01 00:26:57
Can this be private?
xiyuan
2012/03/01 19:58:47
Done.
|
| + |
| AppListModel(); |
| virtual ~AppListModel(); |
| - void AddGroup(AppListItemGroupModel* group); |
| - AppListItemGroupModel* GetGroup(int index); |
| + void AddItem(AppListItemModel* item); |
|
sky
2012/03/01 00:26:57
Document ownership.
xiyuan
2012/03/01 19:58:47
Done.
|
| + AppListItemModel* GetItem(int index); |
| void AddObserver(ui::ListModelObserver* observer); |
| void RemoveObserver(ui::ListModelObserver* observer); |
| - int group_count() const { |
| - return groups_.item_count(); |
| + int item_count() const { |
| + return items_.item_count(); |
| } |
| private: |
| - ui::ListModel<AppListItemGroupModel> groups_; |
| + Items items_; |
| DISALLOW_COPY_AND_ASSIGN(AppListModel); |
| }; |