| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_AURA_SHELL_APP_LIST_APP_LIST_MODEL_H_ | |
| 6 #define UI_AURA_SHELL_APP_LIST_APP_LIST_MODEL_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "ui/aura_shell/app_list/app_list_item_group_model.h" | |
| 11 #include "ui/aura_shell/aura_shell_export.h" | |
| 12 #include "ui/base/models/list_model.h" | |
| 13 | |
| 14 namespace aura_shell { | |
| 15 | |
| 16 // Model for AppListView. It is consisted of a list of AppListItemGroupModels, | |
| 17 // which in turn owns a list of AppListItemModels. | |
| 18 class AURA_SHELL_EXPORT AppListModel { | |
| 19 public: | |
| 20 AppListModel(); | |
| 21 virtual ~AppListModel(); | |
| 22 | |
| 23 void AddGroup(AppListItemGroupModel* group); | |
| 24 AppListItemGroupModel* GetGroup(int index); | |
| 25 | |
| 26 void AddObserver(ui::ListModelObserver* observer); | |
| 27 void RemoveObserver(ui::ListModelObserver* observer); | |
| 28 | |
| 29 int group_count() const { | |
| 30 return groups_.item_count(); | |
| 31 } | |
| 32 | |
| 33 private: | |
| 34 ui::ListModel<AppListItemGroupModel> groups_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(AppListModel); | |
| 37 }; | |
| 38 | |
| 39 } // namespace aura_shell | |
| 40 | |
| 41 #endif // UI_AURA_SHELL_APP_LIST_APP_LIST_MODEL_H_ | |
| OLD | NEW |