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/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 #include "ui/app_list/app_list_export.h" | 11 #include "ui/app_list/app_list_export.h" |
12 #include "ui/app_list/app_list_model_observer.h" | 12 #include "ui/app_list/app_list_model_observer.h" |
13 #include "ui/views/bubble/bubble_delegate.h" | 13 #include "ui/views/bubble/bubble_delegate.h" |
14 | 14 |
| 15 namespace base { |
| 16 class FilePath; |
| 17 } |
| 18 |
15 namespace views { | 19 namespace views { |
16 class Widget; | 20 class Widget; |
17 } | 21 } |
18 | 22 |
19 namespace app_list { | 23 namespace app_list { |
20 class ApplicationDragAndDropHost; | 24 class ApplicationDragAndDropHost; |
21 class AppListMainView; | 25 class AppListMainView; |
22 class AppListModel; | 26 class AppListModel; |
23 class AppListViewDelegate; | 27 class AppListViewDelegate; |
24 class PaginationModel; | 28 class PaginationModel; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual void Paint(gfx::Canvas* canvas) OVERRIDE; | 75 virtual void Paint(gfx::Canvas* canvas) OVERRIDE; |
72 | 76 |
73 // WidgetDelegate overrides: | 77 // WidgetDelegate overrides: |
74 virtual bool ShouldHandleSystemCommands() const OVERRIDE; | 78 virtual bool ShouldHandleSystemCommands() const OVERRIDE; |
75 | 79 |
76 void Prerender(); | 80 void Prerender(); |
77 | 81 |
78 // Invoked when the sign-in status is changed to switch on/off sign-in view. | 82 // Invoked when the sign-in status is changed to switch on/off sign-in view. |
79 void OnSigninStatusChanged(); | 83 void OnSigninStatusChanged(); |
80 | 84 |
| 85 void SetProfileByPath(const base::FilePath& profile_path); |
| 86 |
81 void AddObserver(Observer* observer); | 87 void AddObserver(Observer* observer); |
82 void RemoveObserver(Observer* observer); | 88 void RemoveObserver(Observer* observer); |
83 | 89 |
84 // Set a callback to be called the next time any app list paints. | 90 // Set a callback to be called the next time any app list paints. |
85 static void SetNextPaintCallback(const base::Closure& callback); | 91 static void SetNextPaintCallback(const base::Closure& callback); |
86 | 92 |
87 #if defined(OS_WIN) | 93 #if defined(OS_WIN) |
88 HWND GetHWND() const; | 94 HWND GetHWND() const; |
89 #endif | 95 #endif |
90 | 96 |
(...skipping 10 matching lines...) Expand all Loading... |
101 | 107 |
102 // Overridden from views::WidgetObserver: | 108 // Overridden from views::WidgetObserver: |
103 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; | 109 virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; |
104 virtual void OnWidgetVisibilityChanged( | 110 virtual void OnWidgetVisibilityChanged( |
105 views::Widget* widget, bool visible) OVERRIDE; | 111 views::Widget* widget, bool visible) OVERRIDE; |
106 virtual void OnWidgetActivationChanged( | 112 virtual void OnWidgetActivationChanged( |
107 views::Widget* widget, bool active) OVERRIDE; | 113 views::Widget* widget, bool active) OVERRIDE; |
108 | 114 |
109 // Overridden from AppListModelObserver: | 115 // Overridden from AppListModelObserver: |
110 virtual void OnAppListModelSigninStatusChanged() OVERRIDE; | 116 virtual void OnAppListModelSigninStatusChanged() OVERRIDE; |
111 virtual void OnAppListModelCurrentUserChanged() OVERRIDE; | 117 virtual void OnAppListModelUsersChanged() OVERRIDE; |
112 | 118 |
113 SigninDelegate* GetSigninDelegate(); | 119 SigninDelegate* GetSigninDelegate(); |
114 | 120 |
115 scoped_ptr<AppListModel> model_; | 121 scoped_ptr<AppListModel> model_; |
116 scoped_ptr<AppListViewDelegate> delegate_; | 122 scoped_ptr<AppListViewDelegate> delegate_; |
117 | 123 |
118 AppListMainView* app_list_main_view_; | 124 AppListMainView* app_list_main_view_; |
119 SigninView* signin_view_; | 125 SigninView* signin_view_; |
120 | 126 |
121 ObserverList<Observer> observers_; | 127 ObserverList<Observer> observers_; |
122 | 128 |
123 DISALLOW_COPY_AND_ASSIGN(AppListView); | 129 DISALLOW_COPY_AND_ASSIGN(AppListView); |
124 }; | 130 }; |
125 | 131 |
126 } // namespace app_list | 132 } // namespace app_list |
127 | 133 |
128 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 134 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
OLD | NEW |