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 #include "ash/shell/shell_delegate_impl.h" | 5 #include "ash/shell/shell_delegate_impl.h" |
6 | 6 |
7 #include "ash/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
8 #include "ash/default_accessibility_delegate.h" | 8 #include "ash/default_accessibility_delegate.h" |
9 #include "ash/default_user_wallpaper_delegate.h" | 9 #include "ash/default_user_wallpaper_delegate.h" |
10 #include "ash/gpu_support_stub.h" | 10 #include "ash/gpu_support_stub.h" |
11 #include "ash/media_delegate.h" | 11 #include "ash/media_delegate.h" |
12 #include "ash/new_window_delegate.h" | 12 #include "ash/new_window_delegate.h" |
13 #include "ash/session/session_state_delegate.h" | 13 #include "ash/session/session_state_delegate.h" |
14 #include "ash/shell/context_menu.h" | 14 #include "ash/shell/context_menu.h" |
15 #include "ash/shell/example_factory.h" | 15 #include "ash/shell/example_factory.h" |
16 #include "ash/shell/keyboard_controller_proxy_stub.h" | 16 #include "ash/shell/keyboard_controller_proxy_stub.h" |
17 #include "ash/shell/shelf_delegate_impl.h" | 17 #include "ash/shell/shelf_delegate_impl.h" |
18 #include "ash/shell/toplevel_window.h" | 18 #include "ash/shell/toplevel_window.h" |
19 #include "ash/shell_window_ids.h" | 19 #include "ash/shell_window_ids.h" |
20 #include "ash/system/tray/default_system_tray_delegate.h" | 20 #include "ash/system/tray/default_system_tray_delegate.h" |
21 #include "ash/wm/window_state.h" | 21 #include "ash/wm/window_state.h" |
22 #include "base/message_loop/message_loop.h" | 22 #include "base/message_loop/message_loop.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
24 #include "components/user_manager/user_info_impl.h" | 24 #include "components/user_manager/user_info_impl.h" |
| 25 #include "ui/app_list/app_list_view_delegate.h" |
25 #include "ui/aura/window.h" | 26 #include "ui/aura/window.h" |
26 #include "ui/wm/core/input_method_event_filter.h" | 27 #include "ui/wm/core/input_method_event_filter.h" |
27 | 28 |
28 namespace ash { | 29 namespace ash { |
29 namespace shell { | 30 namespace shell { |
30 namespace { | 31 namespace { |
31 | 32 |
32 class NewWindowDelegateImpl : public NewWindowDelegate { | 33 class NewWindowDelegateImpl : public NewWindowDelegate { |
33 public: | 34 public: |
34 NewWindowDelegateImpl() {} | 35 NewWindowDelegateImpl() {} |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 206 } |
206 | 207 |
207 void ShellDelegateImpl::RemoveVirtualKeyboardStateObserver( | 208 void ShellDelegateImpl::RemoveVirtualKeyboardStateObserver( |
208 VirtualKeyboardStateObserver* observer) { | 209 VirtualKeyboardStateObserver* observer) { |
209 } | 210 } |
210 | 211 |
211 content::BrowserContext* ShellDelegateImpl::GetActiveBrowserContext() { | 212 content::BrowserContext* ShellDelegateImpl::GetActiveBrowserContext() { |
212 return browser_context_; | 213 return browser_context_; |
213 } | 214 } |
214 | 215 |
215 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { | 216 app_list::AppListViewDelegate* ShellDelegateImpl::GetAppListViewDelegate() { |
216 return ash::shell::CreateAppListViewDelegate(); | 217 if (!app_list_view_delegate_) |
| 218 app_list_view_delegate_.reset(ash::shell::CreateAppListViewDelegate()); |
| 219 return app_list_view_delegate_.get(); |
217 } | 220 } |
218 | 221 |
219 ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) { | 222 ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) { |
220 shelf_delegate_ = new ShelfDelegateImpl(watcher_); | 223 shelf_delegate_ = new ShelfDelegateImpl(watcher_); |
221 return shelf_delegate_; | 224 return shelf_delegate_; |
222 } | 225 } |
223 | 226 |
224 ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate() { | 227 ash::SystemTrayDelegate* ShellDelegateImpl::CreateSystemTrayDelegate() { |
225 return new DefaultSystemTrayDelegate; | 228 return new DefaultSystemTrayDelegate; |
226 } | 229 } |
(...skipping 29 matching lines...) Expand all Loading... |
256 // Real GPU support depends on src/content, so just use a stub. | 259 // Real GPU support depends on src/content, so just use a stub. |
257 return new GPUSupportStub; | 260 return new GPUSupportStub; |
258 } | 261 } |
259 | 262 |
260 base::string16 ShellDelegateImpl::GetProductName() const { | 263 base::string16 ShellDelegateImpl::GetProductName() const { |
261 return base::string16(); | 264 return base::string16(); |
262 } | 265 } |
263 | 266 |
264 } // namespace shell | 267 } // namespace shell |
265 } // namespace ash | 268 } // namespace ash |
OLD | NEW |