OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/app_list/app_list_export.h" | 9 #include "ui/app_list/app_list_export.h" |
10 #include "ui/app_list/app_list_model_observer.h" | |
10 #include "ui/app_list/signin_delegate_observer.h" | 11 #include "ui/app_list/signin_delegate_observer.h" |
11 #include "ui/views/bubble/bubble_delegate.h" | 12 #include "ui/views/bubble/bubble_delegate.h" |
12 | 13 |
13 namespace views { | 14 namespace views { |
14 class Widget; | 15 class Widget; |
15 } | 16 } |
16 | 17 |
17 namespace app_list { | 18 namespace app_list { |
18 class ApplicationDragAndDropHost; | 19 class ApplicationDragAndDropHost; |
19 class AppListMainView; | 20 class AppListMainView; |
20 class AppListModel; | 21 class AppListModel; |
21 class AppListViewDelegate; | 22 class AppListViewDelegate; |
22 class PaginationModel; | 23 class PaginationModel; |
23 class SigninDelegate; | 24 class SigninDelegate; |
24 class SigninView; | 25 class SigninView; |
25 | 26 |
26 // AppListView is the top-level view and controller of app list UI. It creates | 27 // AppListView is the top-level view and controller of app list UI. It creates |
27 // and hosts a AppsGridView and passes AppListModel to it for display. | 28 // and hosts a AppsGridView and passes AppListModel to it for display. |
28 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, | 29 class APP_LIST_EXPORT AppListView : public views::BubbleDelegateView, |
29 public SigninDelegateObserver { | 30 public AppListModelObserver { |
30 public: | 31 public: |
31 // Takes ownership of |delegate|. | 32 // Takes ownership of |delegate|. |
32 explicit AppListView(AppListViewDelegate* delegate); | 33 explicit AppListView(AppListViewDelegate* delegate); |
33 virtual ~AppListView(); | 34 virtual ~AppListView(); |
34 | 35 |
35 // Initializes the widget. | 36 // Initializes the widget. |
36 void InitAsBubble(gfx::NativeView parent, | 37 void InitAsBubble(gfx::NativeView parent, |
37 PaginationModel* pagination_model, | 38 PaginationModel* pagination_model, |
38 views::View* anchor, | 39 views::View* anchor, |
39 const gfx::Point& anchor_point, | 40 const gfx::Point& anchor_point, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; | 82 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; |
82 virtual void Layout() OVERRIDE; | 83 virtual void Layout() OVERRIDE; |
83 | 84 |
84 // Overridden from views::WidgetObserver: | 85 // Overridden from views::WidgetObserver: |
85 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | 86 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; |
86 virtual void OnWidgetVisibilityChanged( | 87 virtual void OnWidgetVisibilityChanged( |
87 views::Widget* widget, bool visible) OVERRIDE; | 88 views::Widget* widget, bool visible) OVERRIDE; |
88 virtual void OnWidgetActivationChanged( | 89 virtual void OnWidgetActivationChanged( |
89 views::Widget* widget, bool active) OVERRIDE; | 90 views::Widget* widget, bool active) OVERRIDE; |
90 | 91 |
91 // Overridden from SigninDelegateObserver: | 92 virtual void OnAppListModelSigninStatusChanged() OVERRIDE; |
koz (OOO until 15th September)
2013/08/05 01:09:11
nit: This is also overidden from AppListModelObser
calamity
2013/08/08 04:52:12
Done.
| |
92 virtual void OnSigninSuccess() OVERRIDE; | |
93 | 93 |
94 SigninDelegate* GetSigninDelegate(); | 94 // Overridden from app_list::AppListModelObserver: |
95 virtual void OnAppListModelProfilesChanged() OVERRIDE; | |
95 | 96 |
96 scoped_ptr<AppListModel> model_; | 97 scoped_ptr<AppListModel> model_; |
97 scoped_ptr<AppListViewDelegate> delegate_; | 98 scoped_ptr<AppListViewDelegate> delegate_; |
98 | 99 |
99 AppListMainView* app_list_main_view_; | 100 AppListMainView* app_list_main_view_; |
100 SigninView* signin_view_; | 101 SigninView* signin_view_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(AppListView); | 103 DISALLOW_COPY_AND_ASSIGN(AppListView); |
103 }; | 104 }; |
104 | 105 |
105 } // namespace app_list | 106 } // namespace app_list |
106 | 107 |
107 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 108 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
OLD | NEW |