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

Unified Diff: ash/shell.cc

Issue 2964083002: Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard. (Closed)
Patch Set: Created 3 years, 6 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 | « ash/shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 193274ebc6e91b25d84f62eab6593c070b188724..403796e0ed5871d9f28909811a8de2143ec18833 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -353,7 +353,22 @@ 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()));
+ for (auto& observer : shell_observers_)
+ observer.OnKeyboardControllerCreated();
+ }
+
GetPrimaryRootWindowController()->ActivateKeyboard(
keyboard::KeyboardController::GetInstance());
}
« no previous file with comments | « ash/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698