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 CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <string> | 11 #include <string> |
11 | 12 |
12 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 15 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
16 #include "base/memory/scoped_ptr.h" | |
17 #include "base/memory/scoped_vector.h" | 17 #include "base/memory/scoped_vector.h" |
18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
19 #include "base/scoped_observer.h" | 19 #include "base/scoped_observer.h" |
20 #include "chrome/browser/profiles/profile_attributes_storage.h" | 20 #include "chrome/browser/profiles/profile_attributes_storage.h" |
21 #include "chrome/browser/search/hotword_client.h" | 21 #include "chrome/browser/search/hotword_client.h" |
22 #include "chrome/browser/signin/signin_manager_factory.h" | 22 #include "chrome/browser/signin/signin_manager_factory.h" |
23 #include "chrome/browser/ui/app_list/start_page_observer.h" | 23 #include "chrome/browser/ui/app_list/start_page_observer.h" |
24 #include "components/search_engines/template_url_service.h" | 24 #include "components/search_engines/template_url_service.h" |
25 #include "components/search_engines/template_url_service_observer.h" | 25 #include "components/search_engines/template_url_service_observer.h" |
26 #include "components/signin/core/browser/signin_manager_base.h" | 26 #include "components/signin/core/browser/signin_manager_base.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 AppListControllerDelegate* controller_; | 183 AppListControllerDelegate* controller_; |
184 // Unowned pointer to the associated profile. May change if SetProfileByPath | 184 // Unowned pointer to the associated profile. May change if SetProfileByPath |
185 // is called. | 185 // is called. |
186 Profile* profile_; | 186 Profile* profile_; |
187 // Unowned pointer to the model owned by AppListSyncableService. Will change | 187 // Unowned pointer to the model owned by AppListSyncableService. Will change |
188 // if |profile_| changes. | 188 // if |profile_| changes. |
189 app_list::AppListModel* model_; | 189 app_list::AppListModel* model_; |
190 | 190 |
191 // Note: order ensures |search_resource_manager_| is destroyed before | 191 // Note: order ensures |search_resource_manager_| is destroyed before |
192 // |speech_ui_|. | 192 // |speech_ui_|. |
193 scoped_ptr<app_list::SpeechUIModel> speech_ui_; | 193 std::unique_ptr<app_list::SpeechUIModel> speech_ui_; |
194 scoped_ptr<app_list::SearchResourceManager> search_resource_manager_; | 194 std::unique_ptr<app_list::SearchResourceManager> search_resource_manager_; |
195 scoped_ptr<app_list::SearchController> search_controller_; | 195 std::unique_ptr<app_list::SearchController> search_controller_; |
196 | 196 |
197 scoped_ptr<app_list::LauncherPageEventDispatcher> | 197 std::unique_ptr<app_list::LauncherPageEventDispatcher> |
198 launcher_page_event_dispatcher_; | 198 launcher_page_event_dispatcher_; |
199 | 199 |
200 base::TimeDelta auto_launch_timeout_; | 200 base::TimeDelta auto_launch_timeout_; |
201 // Determines whether the current search was initiated by speech. | 201 // Determines whether the current search was initiated by speech. |
202 bool is_voice_query_; | 202 bool is_voice_query_; |
203 | 203 |
204 Users users_; | 204 Users users_; |
205 | 205 |
206 #if defined(USE_ASH) | 206 #if defined(USE_ASH) |
207 scoped_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; | 207 std::unique_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; |
208 #endif | 208 #endif |
209 | 209 |
210 base::ObserverList<app_list::AppListViewDelegateObserver> observers_; | 210 base::ObserverList<app_list::AppListViewDelegateObserver> observers_; |
211 | 211 |
212 ScopedObserver<TemplateURLService, AppListViewDelegate> | 212 ScopedObserver<TemplateURLService, AppListViewDelegate> |
213 template_url_service_observer_; | 213 template_url_service_observer_; |
214 | 214 |
215 // Used to track the SigninManagers that this instance is observing so that | 215 // Used to track the SigninManagers that this instance is observing so that |
216 // this instance can be removed as an observer on its destruction. | 216 // this instance can be removed as an observer on its destruction. |
217 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; | 217 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; |
218 | 218 |
219 // Window contents of additional custom launcher pages. | 219 // Window contents of additional custom launcher pages. |
220 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; | 220 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; |
221 | 221 |
222 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. | 222 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. |
223 content::NotificationRegistrar registrar_; | 223 content::NotificationRegistrar registrar_; |
224 | 224 |
225 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); | 225 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); |
226 }; | 226 }; |
227 | 227 |
228 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 228 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |