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

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

Issue 10388032: Move app list from ash to ui. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix win_aura bot and comments in #5 Created 8 years, 7 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 | « ui/app_list/app_list_item_view.cc ('k') | ui/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) 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 ASH_APP_LIST_APP_LIST_MODEL_H_ 5 #ifndef UI_APP_LIST_APP_LIST_MODEL_H_
6 #define ASH_APP_LIST_APP_LIST_MODEL_H_ 6 #define UI_APP_LIST_APP_LIST_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/app_list/app_list_item_model.h"
10 #include "ash/ash_export.h"
11 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/app_list/app_list_export.h"
11 #include "ui/app_list/app_list_item_model.h"
12 #include "ui/base/models/list_model.h" 12 #include "ui/base/models/list_model.h"
13 13
14 namespace ash { 14 namespace app_list {
15 15
16 class AppListItemModel; 16 class AppListItemModel;
17 17
18 // Model for AppListModelView that owns a list of AppListItemModels. 18 // Model for AppListModelView that owns a list of AppListItemModels.
19 class ASH_EXPORT AppListModel { 19 class APP_LIST_EXPORT AppListModel {
20 public: 20 public:
21 AppListModel(); 21 AppListModel();
22 virtual ~AppListModel(); 22 virtual ~AppListModel();
23 23
24 // Adds an item to the model. The model takes ownership of |item|. 24 // Adds an item to the model. The model takes ownership of |item|.
25 void AddItem(AppListItemModel* item); 25 void AddItem(AppListItemModel* item);
26 void AddItemAt(int index, AppListItemModel* item); 26 void AddItemAt(int index, AppListItemModel* item);
27 27
28 void DeleteItemAt(int index); 28 void DeleteItemAt(int index);
29 29
30 AppListItemModel* GetItem(int index); 30 AppListItemModel* GetItem(int index);
31 31
32 void AddObserver(ui::ListModelObserver* observer); 32 void AddObserver(ui::ListModelObserver* observer);
33 void RemoveObserver(ui::ListModelObserver* observer); 33 void RemoveObserver(ui::ListModelObserver* observer);
34 34
35 int item_count() const { 35 int item_count() const {
36 return items_.item_count(); 36 return items_.item_count();
37 } 37 }
38 38
39 private: 39 private:
40 typedef ui::ListModel<AppListItemModel> Items; 40 typedef ui::ListModel<AppListItemModel> Items;
41 Items items_; 41 Items items_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(AppListModel); 43 DISALLOW_COPY_AND_ASSIGN(AppListModel);
44 }; 44 };
45 45
46 } // namespace ash 46 } // namespace app_list
47 47
48 #endif // ASH_APP_LIST_APP_LIST_MODEL_H_ 48 #endif // UI_APP_LIST_APP_LIST_MODEL_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_item_view.cc ('k') | ui/app_list/app_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698