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

Side by Side Diff: ash/app_list/app_list_model.h

Issue 9479031: aura: Implement new app list mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compilation error Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/app_list/app_list_item_view_listener.h ('k') | ash/app_list/app_list_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 ASH_APP_LIST_APP_LIST_MODEL_H_ 5 #ifndef ASH_APP_LIST_APP_LIST_MODEL_H_
6 #define ASH_APP_LIST_APP_LIST_MODEL_H_ 6 #define ASH_APP_LIST_APP_LIST_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/app_list/app_list_item_group_model.h" 9 #include "ash/app_list/app_list_item_model.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ash/ash_export.h" 11 #include "ash/ash_export.h"
12 #include "ui/base/models/list_model.h" 12 #include "ui/base/models/list_model.h"
13 13
14 namespace ash { 14 namespace ash {
15 15
16 // Model for AppListView. It is consisted of a list of AppListItemGroupModels, 16 // Model for AppListView. It is consisted of a list of AppListItemGroupModels,
17 // which in turn owns a list of AppListItemModels. 17 // which in turn owns a list of AppListItemModels.
18 class ASH_EXPORT AppListModel { 18 class ASH_EXPORT AppListModel {
19 public: 19 public:
20 typedef ui::ListModel<AppListItemModel> Items;
21
20 AppListModel(); 22 AppListModel();
21 virtual ~AppListModel(); 23 virtual ~AppListModel();
22 24
23 void AddGroup(AppListItemGroupModel* group); 25 void AddItem(AppListItemModel* item);
24 AppListItemGroupModel* GetGroup(int index); 26 AppListItemModel* GetItem(int index);
25 27
26 void AddObserver(ui::ListModelObserver* observer); 28 void AddObserver(ui::ListModelObserver* observer);
27 void RemoveObserver(ui::ListModelObserver* observer); 29 void RemoveObserver(ui::ListModelObserver* observer);
28 30
29 int group_count() const { 31 int item_count() const {
30 return groups_.item_count(); 32 return items_.item_count();
31 } 33 }
32 34
33 private: 35 private:
34 ui::ListModel<AppListItemGroupModel> groups_; 36 Items items_;
35 37
36 DISALLOW_COPY_AND_ASSIGN(AppListModel); 38 DISALLOW_COPY_AND_ASSIGN(AppListModel);
37 }; 39 };
38 40
39 } // namespace ash 41 } // namespace ash
40 42
41 #endif // ASH_APP_LIST_APP_LIST_MODEL_H_ 43 #endif // ASH_APP_LIST_APP_LIST_MODEL_H_
OLDNEW
« no previous file with comments | « ash/app_list/app_list_item_view_listener.h ('k') | ash/app_list/app_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698