OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ | |
6 #define ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
tfarina
2012/03/01 01:10:00
nit: remove both, unused.
xiyuan
2012/03/01 19:58:47
Done.
| |
10 #include <vector> | |
11 | |
12 #include "ash/ash_export.h" | |
13 #include "ui/base/models/list_model_observer.h" | |
14 #include "ui/views/controls/button/button.h" | |
tfarina
2012/03/01 01:10:00
nit: it seems we can forward declare ButtonListene
xiyuan
2012/03/01 19:58:47
Done.
| |
15 #include "ui/views/view.h" | |
16 | |
17 namespace views { | |
18 class BoundsAnimator; | |
tfarina
2012/03/01 01:10:00
nit: remove, unused.
xiyuan
2012/03/01 19:58:47
Done.
| |
19 } | |
20 | |
21 namespace ash { | |
22 | |
23 class AppListModel; | |
24 | |
25 // AppListModelView displays the UI for an AppListModel. | |
26 class ASH_EXPORT AppListModelView : public views::View, | |
27 public ui::ListModelObserver { | |
28 public: | |
29 explicit AppListModelView(views::ButtonListener* listener); | |
30 virtual ~AppListModelView(); | |
31 | |
32 void SetModel(AppListModel* model); | |
33 | |
34 private: | |
35 // Updates from model. | |
36 void Update(); | |
37 | |
38 // Overridden from views::View: | |
39 virtual void Layout() OVERRIDE; | |
40 | |
41 // Overridden from ListModelObserver: | |
42 virtual void ListItemsAdded(int start, int count) OVERRIDE; | |
43 virtual void ListItemsRemoved(int start, int count) OVERRIDE; | |
44 virtual void ListItemsChanged(int start, int count) OVERRIDE; | |
45 | |
46 AppListModel* model_; // Owned by parent AppListView. | |
47 views::ButtonListener* listener_; | |
48 | |
49 DISALLOW_COPY_AND_ASSIGN(AppListModelView); | |
50 }; | |
51 | |
52 } // namespace ash | |
53 | |
54 #endif // ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_ | |
OLD | NEW |