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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 virtual std::vector<views::View*> CreateCustomPageWebViews( | 97 virtual std::vector<views::View*> CreateCustomPageWebViews( |
98 const gfx::Size& size) override; | 98 const gfx::Size& size) override; |
99 #endif | 99 #endif |
100 bool IsSpeechRecognitionEnabled() override; | 100 bool IsSpeechRecognitionEnabled() override; |
101 const Users& GetUsers() const override; | 101 const Users& GetUsers() const override; |
102 bool ShouldCenterWindow() const override; | 102 bool ShouldCenterWindow() const override; |
103 void AddObserver(app_list::AppListViewDelegateObserver* observer) override; | 103 void AddObserver(app_list::AppListViewDelegateObserver* observer) override; |
104 void RemoveObserver(app_list::AppListViewDelegateObserver* observer) override; | 104 void RemoveObserver(app_list::AppListViewDelegateObserver* observer) override; |
105 | 105 |
106 private: | 106 private: |
| 107 class LauncherPageEventDispatcher; |
| 108 |
107 // Updates the speech webview and start page for the current |profile_|. | 109 // Updates the speech webview and start page for the current |profile_|. |
108 void SetUpSearchUI(); | 110 void SetUpSearchUI(); |
109 | 111 |
110 // Updates the app list's ProfileMenuItems for the current |profile_|. | 112 // Updates the app list's ProfileMenuItems for the current |profile_|. |
111 void SetUpProfileSwitcher(); | 113 void SetUpProfileSwitcher(); |
112 | 114 |
113 // Updates the app list's custom launcher pages for the current |profile_|. | 115 // Updates the app list's custom launcher pages for the current |profile_|. |
114 void SetUpCustomLauncherPages(); | 116 void SetUpCustomLauncherPages(); |
115 | 117 |
116 // Overridden from app_list::StartPageObserver: | 118 // Overridden from app_list::StartPageObserver: |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 #endif | 173 #endif |
172 | 174 |
173 ObserverList<app_list::AppListViewDelegateObserver> observers_; | 175 ObserverList<app_list::AppListViewDelegateObserver> observers_; |
174 | 176 |
175 // Used to track the SigninManagers that this instance is observing so that | 177 // Used to track the SigninManagers that this instance is observing so that |
176 // this instance can be removed as an observer on its destruction. | 178 // this instance can be removed as an observer on its destruction. |
177 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; | 179 ScopedObserver<SigninManagerBase, AppListViewDelegate> scoped_observer_; |
178 | 180 |
179 // Window contents of additional custom launcher pages. | 181 // Window contents of additional custom launcher pages. |
180 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; | 182 ScopedVector<apps::CustomLauncherPageContents> custom_page_contents_; |
| 183 scoped_ptr<LauncherPageEventDispatcher> launcher_page_event_dispatcher_; |
181 | 184 |
182 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. | 185 // Registers for NOTIFICATION_APP_TERMINATING to unload custom launcher pages. |
183 content::NotificationRegistrar registrar_; | 186 content::NotificationRegistrar registrar_; |
184 | 187 |
185 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); | 188 DISALLOW_COPY_AND_ASSIGN(AppListViewDelegate); |
186 }; | 189 }; |
187 | 190 |
188 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ | 191 #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_VIEW_DELEGATE_H_ |
OLD | NEW |