Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Side by Side Diff: chrome/browser/chrome_browser_main_extra_parts_aura.cc

Issue 9225004: Handle Caps Lock short cut (Shift+Search) in ash [part 2 of 2]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698