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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/system_key_event_listener.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_extra_parts_aura.cc
diff --git a/chrome/browser/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/chrome_browser_main_extra_parts_aura.cc
index 5ea312d8bfdcdf7cc607d9bc1a872c45db482921..14e2e2921e4e530307f085238ec8936ca2709328 100644
--- a/chrome/browser/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/chrome_browser_main_extra_parts_aura.cc
@@ -8,6 +8,7 @@
#include "ash/shell.h"
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/browser/ui/views/aura/caps_lock_handler.h"
#include "chrome/browser/ui/views/aura/chrome_shell_delegate.h"
#include "chrome/browser/ui/views/aura/screen_orientation_listener.h"
#include "chrome/browser/ui/views/aura/screenshot_taker.h"
@@ -15,6 +16,7 @@
#include "ui/gfx/compositor/compositor_setup.h"
#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/chromeos/system/runtime_environment.h"
#endif
@@ -36,6 +38,12 @@ void ChromeBrowserMainExtraPartsAura::PreProfileInit() {
ash::Shell* shell = ash::Shell::CreateInstance(new ChromeShellDelegate);
shell->accelerator_controller()->SetScreenshotDelegate(
scoped_ptr<ash::ScreenshotDelegate>(new ScreenshotTaker).Pass());
+#if defined(OS_CHROMEOS)
+ chromeos::input_method::XKeyboard* xkeyboard =
+ chromeos::input_method::InputMethodManager::GetInstance()->GetXKeyboard();
+ shell->accelerator_controller()->SetCapsLockDelegate(
+ scoped_ptr<ash::CapsLockDelegate>(new CapsLockHandler(xkeyboard)).Pass());
+#endif
// Make sure the singleton ScreenOrientationListener object is created.
ScreenOrientationListener::GetInstance();
« no previous file with comments | « no previous file | chrome/browser/chromeos/system_key_event_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698