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 <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.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" |
tapted
2016/09/19 07:28:58
remove this?
Matt Giuca
2016/09/21 03:41:26
Done. Also from app_list_test_view_delegate.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" |
27 #include "content/public/browser/notification_observer.h" | 27 #include "content/public/browser/notification_observer.h" |
28 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 void ShowForProfileByPath(const base::FilePath& profile_path) override; | 105 void ShowForProfileByPath(const base::FilePath& profile_path) override; |
106 #if defined(TOOLKIT_VIEWS) | 106 #if defined(TOOLKIT_VIEWS) |
107 views::View* CreateStartPageWebView(const gfx::Size& size) override; | 107 views::View* CreateStartPageWebView(const gfx::Size& size) override; |
108 std::vector<views::View*> CreateCustomPageWebViews( | 108 std::vector<views::View*> CreateCustomPageWebViews( |
109 const gfx::Size& size) override; | 109 const gfx::Size& size) override; |
110 void CustomLauncherPageAnimationChanged(double progress) override; | 110 void CustomLauncherPageAnimationChanged(double progress) override; |
111 void CustomLauncherPagePopSubpage() override; | 111 void CustomLauncherPagePopSubpage() override; |
112 #endif | 112 #endif |
113 bool IsSpeechRecognitionEnabled() override; | 113 bool IsSpeechRecognitionEnabled() override; |
114 const Users& GetUsers() const override; | 114 const Users& GetUsers() const override; |
115 void AddObserver(app_list::AppListViewDelegateObserver* observer) override; | |
116 void RemoveObserver(app_list::AppListViewDelegateObserver* observer) override; | |
117 | 115 |
118 // Overridden from TemplateURLServiceObserver: | 116 // Overridden from TemplateURLServiceObserver: |
119 void OnTemplateURLServiceChanged() override; | 117 void OnTemplateURLServiceChanged() override; |
120 | 118 |
121 private: | 119 private: |
122 // Updates the speech webview and start page for the current |profile_|. | 120 // Updates the speech webview and start page for the current |profile_|. |
123 void SetUpSearchUI(); | 121 void SetUpSearchUI(); |
124 | 122 |
125 // Updates the app list's ProfileMenuItems for the current |profile_|. | 123 // Updates the app list's ProfileMenuItems for the current |profile_|. |
126 void SetUpProfileSwitcher(); | 124 void SetUpProfileSwitcher(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 base::TimeDelta auto_launch_timeout_; | 183 base::TimeDelta auto_launch_timeout_; |
186 // Determines whether the current search was initiated by speech. | 184 // Determines whether the current search was initiated by speech. |
187 bool is_voice_query_; | 185 bool is_voice_query_; |
188 | 186 |
189 Users users_; | 187 Users users_; |
190 | 188 |
191 #if defined(USE_ASH) | 189 #if defined(USE_ASH) |
192 std::unique_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; | 190 std::unique_ptr<AppSyncUIStateWatcher> app_sync_ui_state_watcher_; |
193 #endif | 191 #endif |
194 | 192 |
195 base::ObserverList<app_list::AppListViewDelegateObserver> observers_; | |
196 | |
197 ScopedObserver<TemplateURLService, AppListViewDelegate> | 193 ScopedObserver<TemplateURLService, AppListViewDelegate> |
198 template_url_service_observer_; | 194 template_url_service_observer_; |
199 | 195 |
200 // Used to track the SigninManagers that this instance is observing so that | 196 // Used to track the SigninManagers that this instance is observing so that |
201 // this instance can be removed as an observer on its destruction. | 197 // this instance can be removed as an observer on its destruction. |
202 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; | 198 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; |
203 | 199 |
204 // Window contents of additional custom launcher pages. | 200 // Window contents of additional custom launcher pages. |
205 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; | 201 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; |
206 | 202 |
207 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. | 203 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. |
208 content::NotificationRegistrar registrar_; | 204 content::NotificationRegistrar registrar_; |
209 | 205 |
210 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); | 206 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); |
211 }; | 207 }; |
212 | 208 |
213 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 209 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |