| 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/views/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/views/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" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
| 29 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
| 30 #include "content/public/browser/user_metrics.h" | 30 #include "content/public/browser/user_metrics.h" |
| 31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 32 #include "grit/generated_resources.h" | 32 #include "grit/generated_resources.h" |
| 33 #include "ui/aura/client/user_action_client.h" | 33 #include "ui/aura/client/user_action_client.h" |
| 34 #include "ui/aura/window.h" | 34 #include "ui/aura/window.h" |
| 35 | 35 |
| 36 #if defined(OS_CHROMEOS) | 36 #if defined(OS_CHROMEOS) |
| 37 #include "ash/keyboard_overlay/keyboard_overlay_view.h" |
| 37 #include "base/chromeos/chromeos_version.h" | 38 #include "base/chromeos/chromeos_version.h" |
| 38 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 39 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
| 39 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" | 40 #include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h" |
| 40 #include "chrome/browser/chromeos/extensions/file_manager_util.h" | 41 #include "chrome/browser/chromeos/extensions/file_manager_util.h" |
| 41 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" | 42 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" |
| 42 #include "chrome/browser/chromeos/login/user_manager.h" | 43 #include "chrome/browser/chromeos/login/user_manager.h" |
| 43 #include "chrome/browser/chromeos/login/webui_login_display_host.h" | 44 #include "chrome/browser/chromeos/login/webui_login_display_host.h" |
| 44 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" | 45 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h" |
| 45 #include "chrome/browser/ui/views/keyboard_overlay_dialog_view.h" | |
| 46 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 46 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 47 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" | 47 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
| 48 #include "chromeos/dbus/dbus_thread_manager.h" | 48 #include "chromeos/dbus/dbus_thread_manager.h" |
| 49 #include "chromeos/dbus/power_manager_client.h" | 49 #include "chromeos/dbus/power_manager_client.h" |
| 50 #include "chromeos/dbus/session_manager_client.h" | 50 #include "chromeos/dbus/session_manager_client.h" |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| 54 | 54 |
| 55 // Returns the browser that should handle accelerators. | 55 // Returns the browser that should handle accelerators. |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 break; | 255 break; |
| 256 case ash::Shell::BACKWARD: | 256 case ash::Shell::BACKWARD: |
| 257 chrome::FocusPreviousPane(browser); | 257 chrome::FocusPreviousPane(browser); |
| 258 break; | 258 break; |
| 259 } | 259 } |
| 260 return true; | 260 return true; |
| 261 } | 261 } |
| 262 | 262 |
| 263 void ChromeShellDelegate::ShowKeyboardOverlay() { | 263 void ChromeShellDelegate::ShowKeyboardOverlay() { |
| 264 #if defined(OS_CHROMEOS) | 264 #if defined(OS_CHROMEOS) |
| 265 // TODO(mazda): Move the show logic to ash (http://crbug.com/124222). |
| 265 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); | 266 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
| 266 KeyboardOverlayDialogView::ShowDialog(profile, new ChromeWebContentsHandler); | 267 std::string url(chrome::kChromeUIKeyboardOverlayURL); |
| 268 KeyboardOverlayView::ShowDialog(profile, |
| 269 new ChromeWebContentsHandler, |
| 270 GURL(url)); |
| 267 #endif | 271 #endif |
| 268 } | 272 } |
| 269 | 273 |
| 270 void ChromeShellDelegate::ShowTaskManager() { | 274 void ChromeShellDelegate::ShowTaskManager() { |
| 271 Browser* browser = browser::FindOrCreateTabbedBrowser( | 275 Browser* browser = browser::FindOrCreateTabbedBrowser( |
| 272 ProfileManager::GetDefaultProfileOrOffTheRecord()); | 276 ProfileManager::GetDefaultProfileOrOffTheRecord()); |
| 273 chrome::OpenTaskManager(browser, false); | 277 chrome::OpenTaskManager(browser, false); |
| 274 } | 278 } |
| 275 | 279 |
| 276 content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() { | 280 content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 ash::Shell::GetInstance()->ShowLauncher(); | 376 ash::Shell::GetInstance()->ShowLauncher(); |
| 373 break; | 377 break; |
| 374 default: | 378 default: |
| 375 NOTREACHED() << "Unexpected notification " << type; | 379 NOTREACHED() << "Unexpected notification " << type; |
| 376 } | 380 } |
| 377 #else | 381 #else |
| 378 // MSVC++ warns about switch statements without any cases. | 382 // MSVC++ warns about switch statements without any cases. |
| 379 NOTREACHED() << "Unexpected notification " << type; | 383 NOTREACHED() << "Unexpected notification " << type; |
| 380 #endif | 384 #endif |
| 381 } | 385 } |
| OLD | NEW |