OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_APP_LIST_APP_LIST_MODEL_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_MODEL_H_ |
6 #define UI_APP_LIST_APP_LIST_MODEL_H_ | 6 #define UI_APP_LIST_APP_LIST_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 // NOTE: Currently this class observes |top_level_item_list_|. The View code may | 32 // NOTE: Currently this class observes |top_level_item_list_|. The View code may |
33 // move entries in the item list directly (but can not add or remove them) and | 33 // move entries in the item list directly (but can not add or remove them) and |
34 // the model needs to notify its observers when this occurs. | 34 // the model needs to notify its observers when this occurs. |
35 class APP_LIST_EXPORT AppListModel : public AppListItemListObserver { | 35 class APP_LIST_EXPORT AppListModel : public AppListItemListObserver { |
36 public: | 36 public: |
37 enum Status { | 37 enum Status { |
38 STATUS_NORMAL, | 38 STATUS_NORMAL, |
39 STATUS_SYNCING, // Syncing apps or installing synced apps. | 39 STATUS_SYNCING, // Syncing apps or installing synced apps. |
40 }; | 40 }; |
41 | 41 |
| 42 enum State { |
| 43 STATE_APPS, |
| 44 STATE_SEARCH_RESULTS, |
| 45 STATE_START, |
| 46 |
| 47 INVALID_STATE, |
| 48 }; |
| 49 |
42 typedef ui::ListModel<SearchResult> SearchResults; | 50 typedef ui::ListModel<SearchResult> SearchResults; |
43 | 51 |
44 AppListModel(); | 52 AppListModel(); |
45 ~AppListModel() override; | 53 ~AppListModel() override; |
46 | 54 |
47 void AddObserver(AppListModelObserver* observer); | 55 void AddObserver(AppListModelObserver* observer); |
48 void RemoveObserver(AppListModelObserver* observer); | 56 void RemoveObserver(AppListModelObserver* observer); |
49 | 57 |
50 void SetStatus(Status status); | 58 void SetStatus(Status status); |
51 | 59 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 Status status_; | 179 Status status_; |
172 ObserverList<AppListModelObserver, true> observers_; | 180 ObserverList<AppListModelObserver, true> observers_; |
173 bool folders_enabled_; | 181 bool folders_enabled_; |
174 | 182 |
175 DISALLOW_COPY_AND_ASSIGN(AppListModel); | 183 DISALLOW_COPY_AND_ASSIGN(AppListModel); |
176 }; | 184 }; |
177 | 185 |
178 } // namespace app_list | 186 } // namespace app_list |
179 | 187 |
180 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ | 188 #endif // UI_APP_LIST_APP_LIST_MODEL_H_ |
OLD | NEW |