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

Side by Side Diff: ui/aura_shell/app_list/app_list_view.h

Issue 8890049: [Aura] Implement views-based applist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura Created 8 years, 12 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/aura_shell/app_list/app_list_model.cc ('k') | ui/aura_shell/app_list/app_list_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_AURA_SHELL_APP_LIST_APP_LIST_VIEW_H_
6 #define UI_AURA_SHELL_APP_LIST_APP_LIST_VIEW_H_
7 #pragma once
8
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura_shell/app_list/app_list_item_view_listener.h"
11 #include "ui/aura_shell/aura_shell_export.h"
12 #include "ui/aura_shell/shell_delegate.h"
13 #include "ui/views/widget/widget_delegate.h"
14
15 namespace views {
16 class View;
17 }
18
19 namespace aura_shell {
20
21 class AppListModel;
22 class AppListViewDelegate;
23
24 // AppListView is the top-level view and controller of app list UI. It creates
25 // and hosts a AppListModelView and passes AppListModel to it for display.
26 class AURA_SHELL_EXPORT AppListView : public views::WidgetDelegateView,
27 public AppListItemViewListener {
28 public:
29 // Takes ownership of |model| and |delegate|.
30 AppListView(AppListModel* model,
31 AppListViewDelegate* delegate,
32 const gfx::Rect& bounds,
33 const ShellDelegate::SetWidgetCallback& callback);
34 virtual ~AppListView();
35
36 // Closes app list.
37 void Close();
38
39 private:
40 // Initializes the window.
41 void Init(const gfx::Rect& bounds,
42 const ShellDelegate::SetWidgetCallback& callback);
43
44 // Overridden from views::View:
45 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE;
46 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
47
48 // Overridden from AppListItemModelViewListener:
49 virtual void AppListItemActivated(AppListItemView* sender,
50 int event_flags) OVERRIDE;
51
52 scoped_ptr<AppListModel> model_;
53
54 scoped_ptr<AppListViewDelegate> delegate_;
55
56 DISALLOW_COPY_AND_ASSIGN(AppListView);
57 };
58
59 } // namespace aura_shell
60
61 #endif // UI_AURA_SHELL_APP_LIST_APP_LIST_VIEW_H_
OLDNEW
« no previous file with comments | « ui/aura_shell/app_list/app_list_model.cc ('k') | ui/aura_shell/app_list/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698