From e1b299bafe3bd77bc556fab2f238db6c7a4bb7bb Mon Sep 17 00:00:00 2001 From: "kevers@chromium.org" Date: Wed, 29 Jan 2014 23:53:41 +0000 Subject: Reland a11y keyboard. BUG=297132 Patch set 1 is the original CL: https://codereview.chromium.org/137543002/ which broke tests on the memory bots. Path set 2 contains the fix for the test failure. Review URL: https://codereview.chromium.org/148213010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247784 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/shell.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ash/shell.cc') diff --git a/ash/shell.cc b/ash/shell.cc index d5209fb..4c298a4 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -416,6 +416,17 @@ void Shell::CreateKeyboard() { } } +void Shell::DeactivateKeyboard() { + if (keyboard_controller_.get()) { + RootWindowControllerList controllers = GetAllRootWindowControllers(); + for (RootWindowControllerList::iterator iter = controllers.begin(); + iter != controllers.end(); ++iter) { + (*iter)->DeactivateKeyboard(keyboard_controller_.get()); + } + } + keyboard_controller_.reset(); +} + void Shell::ShowShelf() { RootWindowControllerList controllers = GetAllRootWindowControllers(); for (RootWindowControllerList::iterator iter = controllers.begin(); @@ -860,8 +871,9 @@ void Shell::Init() { // The keyboard system must be initialized before the RootWindowController is // created. - if (keyboard::IsKeyboardEnabled()) +#if defined(OS_CHROMEOS) keyboard::InitializeKeyboard(); +#endif lock_state_controller_.reset(new LockStateController); power_button_controller_.reset(new PowerButtonController( -- cgit v1.1