Chromium Code Reviews| 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/wm/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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); | 265 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
| 266 KeyboardOverlayDialogView::ShowDialog(profile, new ChromeWebContentsHandler); | 266 std::string url(chrome::kChromeUIKeyboardOverlayURL); |
|
Ben Goodger (Google)
2012/07/25 16:36:51
as a next step, you should think about how to remo
mazda
2012/07/25 17:36:32
Sure. I'll continue to work on it.
I added a TODO
| |
| 267 KeyboardOverlayView::ShowDialog(profile, | |
| 268 new ChromeWebContentsHandler, | |
| 269 GURL(url)); | |
| 267 #endif | 270 #endif |
| 268 } | 271 } |
| 269 | 272 |
| 270 void ChromeShellDelegate::ShowTaskManager() { | 273 void ChromeShellDelegate::ShowTaskManager() { |
| 271 Browser* browser = browser::FindOrCreateTabbedBrowser( | 274 Browser* browser = browser::FindOrCreateTabbedBrowser( |
| 272 ProfileManager::GetDefaultProfileOrOffTheRecord()); | 275 ProfileManager::GetDefaultProfileOrOffTheRecord()); |
| 273 chrome::OpenTaskManager(browser, false); | 276 chrome::OpenTaskManager(browser, false); |
| 274 } | 277 } |
| 275 | 278 |
| 276 content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() { | 279 content::BrowserContext* ChromeShellDelegate::GetCurrentBrowserContext() { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 372 ash::Shell::GetInstance()->ShowLauncher(); | 375 ash::Shell::GetInstance()->ShowLauncher(); |
| 373 break; | 376 break; |
| 374 default: | 377 default: |
| 375 NOTREACHED() << "Unexpected notification " << type; | 378 NOTREACHED() << "Unexpected notification " << type; |
| 376 } | 379 } |
| 377 #else | 380 #else |
| 378 // MSVC++ warns about switch statements without any cases. | 381 // MSVC++ warns about switch statements without any cases. |
| 379 NOTREACHED() << "Unexpected notification " << type; | 382 NOTREACHED() << "Unexpected notification " << type; |
| 380 #endif | 383 #endif |
| 381 } | 384 } |
| OLD | NEW |