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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #endif | 48 #endif |
49 | 49 |
50 class AppListViewDelegate : public app_list::AppListViewDelegate, | 50 class AppListViewDelegate : public app_list::AppListViewDelegate, |
51 public app_list::StartPageObserver, | 51 public app_list::StartPageObserver, |
52 public HotwordClient, | 52 public HotwordClient, |
53 public ProfileInfoCacheObserver, | 53 public ProfileInfoCacheObserver, |
54 public SigninManagerBase::Observer, | 54 public SigninManagerBase::Observer, |
55 public SigninManagerFactory::Observer, | 55 public SigninManagerFactory::Observer, |
56 public content::NotificationObserver { | 56 public content::NotificationObserver { |
57 public: | 57 public: |
58 // Constructs Chrome's AppListViewDelegate, initially for |profile|. | 58 // Constructs Chrome's AppListViewDelegate with a NULL Profile. |
59 // Does not take ownership of |controller|. TODO(tapted): It should. | 59 // Does not take ownership of |controller|. TODO(tapted): It should. |
60 AppListViewDelegate(Profile* profile, | 60 explicit AppListViewDelegate(AppListControllerDelegate* controller); |
61 AppListControllerDelegate* controller); | |
62 virtual ~AppListViewDelegate(); | 61 virtual ~AppListViewDelegate(); |
63 | 62 |
64 private: | |
65 // Configure the AppList for the given |profile|. | 63 // Configure the AppList for the given |profile|. |
66 void SetProfile(Profile* profile); | 64 void SetProfile(Profile* profile); |
| 65 Profile* profile() { return profile_; } |
67 | 66 |
| 67 private: |
68 // Updates the speech webview and start page for the current |profile_|. | 68 // Updates the speech webview and start page for the current |profile_|. |
69 void SetUpSearchUI(); | 69 void SetUpSearchUI(); |
70 | 70 |
71 // Updates the app list's ProfileMenuItems for the current |profile_|. | 71 // Updates the app list's ProfileMenuItems for the current |profile_|. |
72 void SetUpProfileSwitcher(); | 72 void SetUpProfileSwitcher(); |
73 | 73 |
74 // Updates the app list's custom launcher pages for the current |profile_|. | 74 // Updates the app list's custom launcher pages for the current |profile_|. |
75 void SetUpCustomLauncherPages(); | 75 void SetUpCustomLauncherPages(); |
76 | 76 |
77 // Overridden from app_list::AppListViewDelegate: | 77 // Overridden from app_list::AppListViewDelegate: |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // Window contents of additional custom launcher pages. | 181 // Window contents of additional custom launcher pages. |
182 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; | 182 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; |
183 | 183 |
184 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. | 184 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. |
185 content::NotificationRegistrar registrar_; | 185 content::NotificationRegistrar registrar_; |
186 | 186 |
187 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); | 187 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); |
188 }; | 188 }; |
189 | 189 |
190 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 190 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |