OLD | NEW |
---|---|
(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/aura_shell_export.h" | |
11 #include "ui/aura_shell/shell_delegate.h" | |
12 #include "ui/views/widget/widget_delegate.h" | |
13 | |
14 namespace views { | |
15 class View; | |
16 } | |
17 | |
18 namespace aura_shell { | |
19 | |
20 class AppListModel; | |
21 class ResultsView; | |
22 | |
23 // AppListView serves as controller of app list UI. It creates and hosts | |
24 // ResultsView, fetches data and passes it to ResultsView to display. | |
25 class AURA_SHELL_EXPORT AppListView : public views::WidgetDelegateView { | |
26 public: | |
27 AppListView(AppListModel* model, | |
sky
2011/12/14 16:51:33
Document ownership.
xiyuan
2011/12/20 00:14:42
Done.
| |
28 const gfx::Rect& bounds, | |
29 const ShellDelegate::SetWidgetCallback& callback); | |
30 virtual ~AppListView(); | |
31 | |
32 // Closes app list. | |
33 void Close(); | |
34 | |
35 private: | |
36 // Initializes the window. | |
37 void Init(const gfx::Rect& bounds, | |
38 const ShellDelegate::SetWidgetCallback& callback); | |
39 | |
40 // Overridden from views::View: | |
41 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; | |
42 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | |
43 | |
44 scoped_ptr<AppListModel> model_; | |
45 ResultsView* results_view_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(AppListView); | |
48 }; | |
49 | |
50 } // namespace aura_shell | |
51 | |
52 #endif // UI_AURA_SHELL_APP_LIST_APP_LIST_VIEW_H_ | |
OLD | NEW |