| Index: ash/shell.cc
|
| diff --git a/ash/shell.cc b/ash/shell.cc
|
| index 193274ebc6e91b25d84f62eab6593c070b188724..757c2eec7f7471d42e57ebb5f152efa966300152 100644
|
| --- a/ash/shell.cc
|
| +++ b/ash/shell.cc
|
| @@ -353,7 +353,20 @@ void Shell::OnRootWindowAdded(aura::Window* root_window) {
|
| }
|
|
|
| void Shell::CreateKeyboard() {
|
| - InitKeyboard();
|
| + if (keyboard::IsKeyboardEnabled()) {
|
| + if (keyboard::KeyboardController::GetInstance()) {
|
| + RootWindowControllerList controllers = GetAllRootWindowControllers();
|
| + for (RootWindowControllerList::iterator iter = controllers.begin();
|
| + iter != controllers.end(); ++iter) {
|
| + (*iter)->DeactivateKeyboard(
|
| + keyboard::KeyboardController::GetInstance());
|
| + }
|
| + }
|
| + keyboard::KeyboardController::ResetInstance(
|
| + new keyboard::KeyboardController(shell_delegate_->CreateKeyboardUI(),
|
| + virtual_keyboard_controller_.get()));
|
| + }
|
| +
|
| GetPrimaryRootWindowController()->ActivateKeyboard(
|
| keyboard::KeyboardController::GetInstance());
|
| }
|
| @@ -1122,22 +1135,6 @@ void Shell::Init(const ShellInitParams& init_params) {
|
| user_metrics_recorder_->OnShellInitialized();
|
| }
|
|
|
| -void Shell::InitKeyboard() {
|
| - if (keyboard::IsKeyboardEnabled()) {
|
| - if (keyboard::KeyboardController::GetInstance()) {
|
| - RootWindowControllerList controllers = GetAllRootWindowControllers();
|
| - for (RootWindowControllerList::iterator iter = controllers.begin();
|
| - iter != controllers.end(); ++iter) {
|
| - (*iter)->DeactivateKeyboard(
|
| - keyboard::KeyboardController::GetInstance());
|
| - }
|
| - }
|
| - keyboard::KeyboardController::ResetInstance(
|
| - new keyboard::KeyboardController(shell_delegate_->CreateKeyboardUI(),
|
| - virtual_keyboard_controller_.get()));
|
| - }
|
| -}
|
| -
|
| void Shell::InitRootWindow(aura::Window* root_window) {
|
| DCHECK(focus_controller_);
|
| DCHECK(visibility_controller_.get());
|
|
|