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 "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/host/root_window_host_factory.h" | 8 #include "ash/host/root_window_host_factory.h" |
9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
10 #include "ash/magnifier/magnifier_constants.h" | 10 #include "ash/magnifier/magnifier_constants.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/lifetime/application_lifetime.h" | 22 #include "chrome/browser/lifetime/application_lifetime.h" |
23 #include "chrome/browser/profiles/profile_manager.h" | 23 #include "chrome/browser/profiles/profile_manager.h" |
24 #include "chrome/browser/sessions/tab_restore_service.h" | 24 #include "chrome/browser/sessions/tab_restore_service.h" |
25 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 25 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
26 #include "chrome/browser/sessions/tab_restore_service_observer.h" | 26 #include "chrome/browser/sessions/tab_restore_service_observer.h" |
27 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" | 27 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
28 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" | 28 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" |
29 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" | 29 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" |
30 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 30 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
31 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" | 31 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" |
32 #include "chrome/browser/ui/ash/session_state_delegate.h" | |
33 #include "chrome/browser/ui/ash/user_action_handler.h" | 32 #include "chrome/browser/ui/ash/user_action_handler.h" |
34 #include "chrome/browser/ui/ash/window_positioner.h" | 33 #include "chrome/browser/ui/ash/window_positioner.h" |
35 #include "chrome/browser/ui/browser.h" | 34 #include "chrome/browser/ui/browser.h" |
36 #include "chrome/browser/ui/browser_commands.h" | 35 #include "chrome/browser/ui/browser_commands.h" |
37 #include "chrome/browser/ui/browser_finder.h" | 36 #include "chrome/browser/ui/browser_finder.h" |
38 #include "chrome/browser/ui/browser_window.h" | 37 #include "chrome/browser/ui/browser_window.h" |
39 #include "chrome/browser/ui/extensions/native_app_window.h" | 38 #include "chrome/browser/ui/extensions/native_app_window.h" |
40 #include "chrome/browser/ui/extensions/shell_window.h" | 39 #include "chrome/browser/ui/extensions/shell_window.h" |
41 #include "chrome/browser/ui/host_desktop.h" | 40 #include "chrome/browser/ui/host_desktop.h" |
42 #include "chrome/browser/ui/immersive_fullscreen_configuration.h" | 41 #include "chrome/browser/ui/immersive_fullscreen_configuration.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // TODO(oshima): This is currently broken with multiple launchers. | 251 // TODO(oshima): This is currently broken with multiple launchers. |
253 // Refactor so that there is just one launcher delegate in the | 252 // Refactor so that there is just one launcher delegate in the |
254 // shell. | 253 // shell. |
255 if (!launcher_delegate_) { | 254 if (!launcher_delegate_) { |
256 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); | 255 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); |
257 launcher_delegate_->Init(); | 256 launcher_delegate_->Init(); |
258 } | 257 } |
259 return launcher_delegate_; | 258 return launcher_delegate_; |
260 } | 259 } |
261 | 260 |
262 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { | |
263 return new SessionStateDelegate; | |
264 } | |
265 | |
266 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() { | 261 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() { |
267 return new UserActionHandler; | 262 return new UserActionHandler; |
268 } | 263 } |
269 | 264 |
270 void ChromeShellDelegate::OpenFeedbackPage() { | 265 void ChromeShellDelegate::OpenFeedbackPage() { |
271 chrome::OpenFeedbackDialog(GetTargetBrowser()); | 266 chrome::OpenFeedbackDialog(GetTargetBrowser()); |
272 } | 267 } |
273 | 268 |
274 void ChromeShellDelegate::RecordUserMetricsAction( | 269 void ChromeShellDelegate::RecordUserMetricsAction( |
275 ash::UserMetricsAction action) { | 270 ash::UserMetricsAction action) { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 return browser; | 436 return browser; |
442 return chrome::FindOrCreateTabbedBrowser( | 437 return chrome::FindOrCreateTabbedBrowser( |
443 ProfileManager::GetDefaultProfileOrOffTheRecord(), | 438 ProfileManager::GetDefaultProfileOrOffTheRecord(), |
444 chrome::HOST_DESKTOP_TYPE_ASH); | 439 chrome::HOST_DESKTOP_TYPE_ASH); |
445 } | 440 } |
446 | 441 |
447 keyboard::KeyboardControllerProxy* | 442 keyboard::KeyboardControllerProxy* |
448 ChromeShellDelegate::CreateKeyboardControllerProxy() { | 443 ChromeShellDelegate::CreateKeyboardControllerProxy() { |
449 return new AshKeyboardControllerProxy(); | 444 return new AshKeyboardControllerProxy(); |
450 } | 445 } |
OLD | NEW |