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

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: review fix, 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
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 f186ca085edfc2cfbc61e63dc8d257c900a3b262..b5b98f5b31011a3dfe24e7cce3ac350ffbae3fe8 100644
--- a/chrome/browser/chrome_browser_main_extra_parts_aura.cc
+++ b/chrome/browser/chrome_browser_main_extra_parts_aura.cc
@@ -8,12 +8,14 @@
#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"
#include "ui/aura/root_window.h"
#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/input_method/input_method_manager.h"
#include "chrome/browser/chromeos/system/runtime_environment.h"
#endif
@@ -45,6 +47,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();

Powered by Google App Engine
This is Rietveld 408576698