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.h" | |
9 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
10 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
11 #include "ui/app_list/app_list_export.h" | 10 #include "ui/app_list/app_list_export.h" |
12 #include "ui/app_list/app_list_view_delegate_observer.h" | 11 #include "ui/app_list/app_list_view_delegate_observer.h" |
13 #include "ui/app_list/speech_ui_model_observer.h" | 12 #include "ui/app_list/speech_ui_model_observer.h" |
14 #include "ui/views/bubble/bubble_delegate.h" | 13 #include "ui/views/bubble/bubble_delegate.h" |
15 #include "ui/views/widget/widget.h" | 14 #include "ui/views/widget/widget.h" |
16 | 15 |
17 namespace base { | 16 namespace base { |
18 class FilePath; | 17 class FilePath; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 virtual void OnProfilesChanged() OVERRIDE; | 91 virtual void OnProfilesChanged() OVERRIDE; |
93 | 92 |
94 void Prerender(); | 93 void Prerender(); |
95 | 94 |
96 void SetProfileByPath(const base::FilePath& profile_path); | 95 void SetProfileByPath(const base::FilePath& profile_path); |
97 | 96 |
98 void AddObserver(AppListViewObserver* observer); | 97 void AddObserver(AppListViewObserver* observer); |
99 void RemoveObserver(AppListViewObserver* observer); | 98 void RemoveObserver(AppListViewObserver* observer); |
100 | 99 |
101 // Set a callback to be called the next time any app list paints. | 100 // Set a callback to be called the next time any app list paints. |
102 void SetNextPaintCallback(const base::Closure& callback); | 101 static void SetNextPaintCallback(void (*callback)()); |
103 | 102 |
104 #if defined(OS_WIN) | 103 #if defined(OS_WIN) |
105 HWND GetHWND() const; | 104 HWND GetHWND() const; |
106 #endif | 105 #endif |
107 | 106 |
108 AppListMainView* app_list_main_view() { return app_list_main_view_; } | 107 AppListMainView* app_list_main_view() { return app_list_main_view_; } |
109 | 108 |
110 private: | 109 private: |
111 void InitAsBubbleInternal(gfx::NativeView parent, | 110 void InitAsBubbleInternal(gfx::NativeView parent, |
112 PaginationModel* pagination_model, | 111 PaginationModel* pagination_model, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 144 |
146 scoped_ptr<AppListViewDelegate> delegate_; | 145 scoped_ptr<AppListViewDelegate> delegate_; |
147 | 146 |
148 AppListMainView* app_list_main_view_; | 147 AppListMainView* app_list_main_view_; |
149 SigninView* signin_view_; | 148 SigninView* signin_view_; |
150 SpeechView* speech_view_; | 149 SpeechView* speech_view_; |
151 | 150 |
152 ObserverList<AppListViewObserver> observers_; | 151 ObserverList<AppListViewObserver> observers_; |
153 scoped_ptr<HideViewAnimationObserver> animation_observer_; | 152 scoped_ptr<HideViewAnimationObserver> animation_observer_; |
154 | 153 |
155 // For UMA and testing. If non-null, triggered when the app list is painted. | |
156 base::Closure next_paint_callback_; | |
157 | |
158 DISALLOW_COPY_AND_ASSIGN(AppListView); | 154 DISALLOW_COPY_AND_ASSIGN(AppListView); |
159 }; | 155 }; |
160 | 156 |
161 } // namespace app_list | 157 } // namespace app_list |
162 | 158 |
163 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ | 159 #endif // UI_APP_LIST_VIEWS_APP_LIST_VIEW_H_ |
OLD | NEW |