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

Unified Diff: ash/shell.cc

Issue 2965503003: Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard. (Closed)
Patch Set: Ash: Inline InitKeyboard, and make the caller of it call CreateKeyboard. 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..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());
« 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