OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_browser_main_extra_parts_aura.h" | 5 #include "chrome/browser/chrome_browser_main_extra_parts_aura.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| 11 #include "chrome/browser/ui/views/aura/caps_lock_handler.h" |
11 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" | 12 #include "chrome/browser/ui/views/aura/chrome_shell_delegate.h" |
12 #include "chrome/browser/ui/views/aura/screen_orientation_listener.h" | 13 #include "chrome/browser/ui/views/aura/screen_orientation_listener.h" |
13 #include "chrome/browser/ui/views/aura/screenshot_taker.h" | 14 #include "chrome/browser/ui/views/aura/screenshot_taker.h" |
14 #include "ui/aura/root_window.h" | 15 #include "ui/aura/root_window.h" |
15 | 16 |
16 #if defined(OS_CHROMEOS) | 17 #if defined(OS_CHROMEOS) |
17 #include "chrome/browser/chromeos/system/runtime_environment.h" | 18 #include "chrome/browser/chromeos/system/runtime_environment.h" |
18 #endif | 19 #endif |
19 | 20 |
20 #if defined(USE_WEBKIT_COMPOSITOR) | 21 #if defined(USE_WEBKIT_COMPOSITOR) |
(...skipping 17 matching lines...) Expand all Loading... |
38 | 39 |
39 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
40 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) | 41 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) |
41 aura::RootWindow::set_use_fullscreen_host_window(true); | 42 aura::RootWindow::set_use_fullscreen_host_window(true); |
42 #endif | 43 #endif |
43 | 44 |
44 // Shell takes ownership of ChromeShellDelegate. | 45 // Shell takes ownership of ChromeShellDelegate. |
45 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); | 46 ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate); |
46 // AcceleratorController takes ownership of ScreenshotDelegate. | 47 // AcceleratorController takes ownership of ScreenshotDelegate. |
47 shell->accelerator_controller()->SetScreenshotDelegate(new ScreenshotTaker); | 48 shell->accelerator_controller()->SetScreenshotDelegate(new ScreenshotTaker); |
| 49 shell->accelerator_controller()->SetCapsLockDelegate( |
| 50 scoped_ptr<ash::CapsLockDelegate>(new CapsLockHandler).Pass()); |
48 | 51 |
49 // Make sure the singleton ScreenOrientationListener object is created. | 52 // Make sure the singleton ScreenOrientationListener object is created. |
50 ScreenOrientationListener::GetInstance(); | 53 ScreenOrientationListener::GetInstance(); |
51 } | 54 } |
52 | 55 |
53 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { | 56 void ChromeBrowserMainExtraPartsAura::PostMainMessageLoopRun() { |
54 ash::Shell::DeleteInstance(); | 57 ash::Shell::DeleteInstance(); |
55 aura::RootWindow::DeleteInstance(); | 58 aura::RootWindow::DeleteInstance(); |
56 } | 59 } |
OLD | NEW |