| 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/launcher/launcher_types.h" | 7 #include "ash/launcher/launcher_types.h" |
| 8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "chrome/browser/chromeos/login/screen_locker.h" | 11 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 12 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" | 12 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" |
| 13 #include "chrome/browser/lifetime/application_lifetime.h" | 13 #include "chrome/browser/lifetime/application_lifetime.h" |
| 14 #include "chrome/browser/profiles/profile_manager.h" | 14 #include "chrome/browser/profiles/profile_manager.h" |
| 15 #include "chrome/browser/sessions/tab_restore_service.h" | 15 #include "chrome/browser/sessions/tab_restore_service.h" |
| 16 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 16 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 17 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" | 17 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" |
| 18 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" | 18 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" |
| 19 #include "chrome/browser/ui/ash/caps_lock_handler.h" |
| 19 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 20 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 20 #include "chrome/browser/ui/ash/user_action_handler.h" | 21 #include "chrome/browser/ui/ash/user_action_handler.h" |
| 21 #include "chrome/browser/ui/ash/window_positioner.h" | 22 #include "chrome/browser/ui/ash/window_positioner.h" |
| 22 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
| 23 #include "chrome/browser/ui/browser_commands.h" | 24 #include "chrome/browser/ui/browser_commands.h" |
| 24 #include "chrome/browser/ui/browser_finder.h" | 25 #include "chrome/browser/ui/browser_finder.h" |
| 25 #include "chrome/browser/ui/browser_window.h" | 26 #include "chrome/browser/ui/browser_window.h" |
| 26 #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" | 27 #include "chrome/browser/ui/webui/chrome_web_contents_handler.h" |
| 27 #include "chrome/common/chrome_notification_types.h" | 28 #include "chrome/common/chrome_notification_types.h" |
| 28 #include "chrome/common/chrome_switches.h" | 29 #include "chrome/common/chrome_switches.h" |
| 29 #include "chrome/common/url_constants.h" | 30 #include "chrome/common/url_constants.h" |
| 30 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
| 31 #include "content/public/browser/user_metrics.h" | 32 #include "content/public/browser/user_metrics.h" |
| 32 #include "content/public/browser/web_contents.h" | 33 #include "content/public/browser/web_contents.h" |
| 33 #include "grit/generated_resources.h" | 34 #include "grit/generated_resources.h" |
| 34 #include "ui/aura/client/user_action_client.h" | 35 #include "ui/aura/client/user_action_client.h" |
| 35 #include "ui/aura/window.h" | 36 #include "ui/aura/window.h" |
| 36 | 37 |
| 37 #if defined(OS_CHROMEOS) | 38 #if defined(OS_CHROMEOS) |
| 38 #include "ash/keyboard_overlay/keyboard_overlay_view.h" | 39 #include "ash/keyboard_overlay/keyboard_overlay_view.h" |
| 39 #include "base/chromeos/chromeos_version.h" | 40 #include "base/chromeos/chromeos_version.h" |
| 40 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 41 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 41 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" | 42 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" |
| 42 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 43 #include "chrome/browser/chromeos/extensions/file_manager_util.h" |
| 43 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" | 44 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" |
| 45 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 44 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 46 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 45 #include "chrome/browser/chromeos/login/user_manager.h" | 47 #include "chrome/browser/chromeos/login/user_manager.h" |
| 46 #include "chrome/browser/chromeos/login/webui_login_display_host.h" | 48 #include "chrome/browser/chromeos/login/webui_login_display_host.h" |
| 47 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 49 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 48 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 50 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 49 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" | 51 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
| 50 #include "chromeos/dbus/dbus_thread_manager.h" | 52 #include "chromeos/dbus/dbus_thread_manager.h" |
| 51 #include "chromeos/dbus/power_manager_client.h" | 53 #include "chromeos/dbus/power_manager_client.h" |
| 52 #include "chromeos/dbus/session_manager_client.h" | 54 #include "chromeos/dbus/session_manager_client.h" |
| 53 #endif | 55 #endif |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 } | 317 } |
| 316 | 318 |
| 317 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { | 319 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { |
| 318 #if defined(OS_CHROMEOS) | 320 #if defined(OS_CHROMEOS) |
| 319 return chromeos::CreateUserWallpaperDelegate(); | 321 return chromeos::CreateUserWallpaperDelegate(); |
| 320 #else | 322 #else |
| 321 return NULL; | 323 return NULL; |
| 322 #endif | 324 #endif |
| 323 } | 325 } |
| 324 | 326 |
| 327 ash::CapsLockDelegate* ChromeShellDelegate::CreateCapsLockDelegate() { |
| 328 #if defined(OS_CHROMEOS) |
| 329 chromeos::input_method::XKeyboard* xkeyboard = |
| 330 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard(); |
| 331 return new CapsLockHandler(xkeyboard); |
| 332 #else |
| 333 return new CapsLockHandler; |
| 334 #endif |
| 335 } |
| 336 |
| 325 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() { | 337 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() { |
| 326 return new UserActionHandler; | 338 return new UserActionHandler; |
| 327 } | 339 } |
| 328 | 340 |
| 329 void ChromeShellDelegate::OpenFeedbackPage() { | 341 void ChromeShellDelegate::OpenFeedbackPage() { |
| 330 chrome::OpenFeedbackDialog(GetTargetBrowser()); | 342 chrome::OpenFeedbackDialog(GetTargetBrowser()); |
| 331 } | 343 } |
| 332 | 344 |
| 333 void ChromeShellDelegate::RecordUserMetricsAction( | 345 void ChromeShellDelegate::RecordUserMetricsAction( |
| 334 ash::UserMetricsAction action) { | 346 ash::UserMetricsAction action) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 ash::Shell::GetInstance()->ShowLauncher(); | 409 ash::Shell::GetInstance()->ShowLauncher(); |
| 398 break; | 410 break; |
| 399 default: | 411 default: |
| 400 NOTREACHED() << "Unexpected notification " << type; | 412 NOTREACHED() << "Unexpected notification " << type; |
| 401 } | 413 } |
| 402 #else | 414 #else |
| 403 // MSVC++ warns about switch statements without any cases. | 415 // MSVC++ warns about switch statements without any cases. |
| 404 NOTREACHED() << "Unexpected notification " << type; | 416 NOTREACHED() << "Unexpected notification " << type; |
| 405 #endif | 417 #endif |
| 406 } | 418 } |
| OLD | NEW |