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

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

Issue 9559005: aura: Implement app list M19 mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
OLDNEW
(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>
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"
15 #include "ui/views/view.h"
16
17 namespace views {
18 class BoundsAnimator;
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 // Sets focused tile by index.
39 void SetFocusedTileByIndex(int index);
40
41 // Overridden from views::View:
42 virtual void Layout() OVERRIDE;
43
44 // Overridden from ListModelObserver:
45 virtual void ListItemsAdded(int start, int count) OVERRIDE;
46 virtual void ListItemsRemoved(int start, int count) OVERRIDE;
47 virtual void ListItemsChanged(int start, int count) OVERRIDE;
48
49 AppListModel* model_; // Owned by parent AppListView.
50 views::ButtonListener* listener_;
51
52 DISALLOW_COPY_AND_ASSIGN(AppListModelView);
53 };
54
55 } // namespace ash
56
57 #endif // ASH_APP_LIST_APP_LIST_MODEL_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698