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

Unified Diff: ash/root_window_controller.cc

Issue 13164002: Create and show the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix upstream Created 7 years, 8 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/root_window_controller.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 5fa1934d18fc2ce54b53b7df1c3748fafff22ac0..394922f871c73adba0d25179d4f88876ad6821b9 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -49,6 +49,8 @@
#include "ui/base/models/menu_model.h"
#include "ui/gfx/display.h"
#include "ui/gfx/screen.h"
+#include "ui/keyboard/keyboard_controller.h"
+#include "ui/keyboard/keyboard_util.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/corewm/visibility_controller.h"
#include "ui/views/view_model.h"
@@ -290,6 +292,10 @@ void RootWindowController::InitForPrimaryDisplay() {
}
if (Shell::GetInstance()->delegate()->IsUserLoggedIn())
shelf_->CreateLauncher();
+
+ // TODO(bryeung): Move this to CreateContainersInRootWindow when the
+ // keyboard controller will take care of deferring creation of the keyboard.
+ InitKeyboard();
}
void RootWindowController::CreateContainers() {
@@ -496,6 +502,24 @@ bool RootWindowController::IsImmersiveMode() const {
return false;
}
+void RootWindowController::InitKeyboard() {
+ if (keyboard::IsKeyboardEnabled()) {
+ aura::Window* parent = root_window();
+
+ keyboard::KeyboardControllerProxy* proxy =
+ Shell::GetInstance()->delegate()->CreateKeyboardControllerProxy();
+ keyboard_controller_.reset(
+ new keyboard::KeyboardController(proxy));
+ aura::Window* keyboard_container =
+ keyboard_controller_->GetContainerWindow();
+ parent->AddChild(keyboard_container);
+ // TODO(bryeung): move this to the controller on visibility changed
+ parent->StackChildAtTop(keyboard_container);
+ keyboard_container->Show();
+ }
+}
+
+
////////////////////////////////////////////////////////////////////////////////
// RootWindowController, private:
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell/shell_delegate_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698