| 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" |
| 44 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 43 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 45 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 44 #include "chrome/browser/chromeos/login/user_manager.h" | 46 #include "chrome/browser/chromeos/login/user_manager.h" |
| 45 #include "chrome/browser/chromeos/login/webui_login_display_host.h" | 47 #include "chrome/browser/chromeos/login/webui_login_display_host.h" |
| 46 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 48 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 47 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 49 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 48 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" | 50 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
| 49 #include "chromeos/dbus/dbus_thread_manager.h" | 51 #include "chromeos/dbus/dbus_thread_manager.h" |
| 50 #include "chromeos/dbus/power_manager_client.h" | 52 #include "chromeos/dbus/power_manager_client.h" |
| 51 #include "chromeos/dbus/session_manager_client.h" | 53 #include "chromeos/dbus/session_manager_client.h" |
| 52 #endif | 54 #endif |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 316 } |
| 315 | 317 |
| 316 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { | 318 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { |
| 317 #if defined(OS_CHROMEOS) | 319 #if defined(OS_CHROMEOS) |
| 318 return chromeos::CreateUserWallpaperDelegate(); | 320 return chromeos::CreateUserWallpaperDelegate(); |
| 319 #else | 321 #else |
| 320 return NULL; | 322 return NULL; |
| 321 #endif | 323 #endif |
| 322 } | 324 } |
| 323 | 325 |
| 326 ash::CapsLockDelegate* ChromeShellDelegate::CreateCapsLockDelegate() { |
| 327 #if defined(OS_CHROMEOS) |
| 328 chromeos::input_method::XKeyboard* xkeyboard = |
| 329 chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard(); |
| 330 return new CapsLockHandler(xkeyboard); |
| 331 #else |
| 332 return new CapsLockHandler; |
| 333 #endif |
| 334 } |
| 335 |
| 324 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() { | 336 aura::client::UserActionClient* ChromeShellDelegate::CreateUserActionClient() { |
| 325 return new UserActionHandler; | 337 return new UserActionHandler; |
| 326 } | 338 } |
| 327 | 339 |
| 328 void ChromeShellDelegate::OpenFeedbackPage() { | 340 void ChromeShellDelegate::OpenFeedbackPage() { |
| 329 chrome::OpenFeedbackDialog(GetTargetBrowser()); | 341 chrome::OpenFeedbackDialog(GetTargetBrowser()); |
| 330 } | 342 } |
| 331 | 343 |
| 332 void ChromeShellDelegate::RecordUserMetricsAction( | 344 void ChromeShellDelegate::RecordUserMetricsAction( |
| 333 ash::UserMetricsAction action) { | 345 ash::UserMetricsAction action) { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 ash::Shell::GetInstance()->ShowLauncher(); | 390 ash::Shell::GetInstance()->ShowLauncher(); |
| 379 break; | 391 break; |
| 380 default: | 392 default: |
| 381 NOTREACHED() << "Unexpected notification " << type; | 393 NOTREACHED() << "Unexpected notification " << type; |
| 382 } | 394 } |
| 383 #else | 395 #else |
| 384 // MSVC++ warns about switch statements without any cases. | 396 // MSVC++ warns about switch statements without any cases. |
| 385 NOTREACHED() << "Unexpected notification " << type; | 397 NOTREACHED() << "Unexpected notification " << type; |
| 386 #endif | 398 #endif |
| 387 } | 399 } |
| OLD | NEW |