Index: ui/aura_shell/app_list/app_list_view.h |
diff --git a/ui/aura_shell/app_list/app_list_view.h b/ui/aura_shell/app_list/app_list_view.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6bbd9f10723f81b6d29abf401f7bf54844f3d616 |
--- /dev/null |
+++ b/ui/aura_shell/app_list/app_list_view.h |
@@ -0,0 +1,52 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_AURA_SHELL_APP_LIST_APP_LIST_VIEW_H_ |
+#define UI_AURA_SHELL_APP_LIST_APP_LIST_VIEW_H_ |
+#pragma once |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "ui/aura_shell/aura_shell_export.h" |
+#include "ui/aura_shell/shell_delegate.h" |
+#include "ui/views/widget/widget_delegate.h" |
+ |
+namespace views { |
+class View; |
+} |
+ |
+namespace aura_shell { |
+ |
+class AppListModel; |
+class ResultsView; |
+ |
+// AppListView serves as controller of app list UI. It creates and hosts |
+// ResultsView, fetches data and passes it to ResultsView to display. |
+class AURA_SHELL_EXPORT AppListView : public views::WidgetDelegateView { |
+ public: |
+ AppListView(AppListModel* model, |
sky
2011/12/14 16:51:33
Document ownership.
xiyuan
2011/12/20 00:14:42
Done.
|
+ const gfx::Rect& bounds, |
+ const ShellDelegate::SetWidgetCallback& callback); |
+ virtual ~AppListView(); |
+ |
+ // Closes app list. |
+ void Close(); |
+ |
+ private: |
+ // Initializes the window. |
+ void Init(const gfx::Rect& bounds, |
+ const ShellDelegate::SetWidgetCallback& callback); |
+ |
+ // Overridden from views::View: |
+ virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; |
+ virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
+ |
+ scoped_ptr<AppListModel> model_; |
+ ResultsView* results_view_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(AppListView); |
+}; |
+ |
+} // namespace aura_shell |
+ |
+#endif // UI_AURA_SHELL_APP_LIST_APP_LIST_VIEW_H_ |