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

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: remove fixme Created 7 years, 9 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
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index f216c7ab8c464b71b2ff9676cda7f0688f3be08a..41a9da0619897ed83b962bc03ec4a1f7b5431ecc 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -48,6 +48,7 @@
#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/views/controls/menu/menu_model_adapter.h"
#include "ui/views/controls/menu/menu_runner.h"
#include "ui/views/corewm/visibility_controller.h"
@@ -262,6 +263,10 @@ void RootWindowController::InitLayoutManagers() {
always_on_top_container->SetLayoutManager(
new BaseLayoutManager(
always_on_top_container->GetRootWindow()));
+
+ // TODO(bryeung): Move this to CreateContainersInRootWindow when the
+ // keyboard controller will take care of deferring creation of the keyboard.
+ InitKeyboard(root_window());
}
void RootWindowController::InitForPrimaryDisplay() {
@@ -293,6 +298,18 @@ void RootWindowController::CreateContainers() {
CreateContainersInRootWindow(root_window_.get());
}
+void RootWindowController::InitKeyboard(aura::Window* parent) {
+ 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);
+}
+
void RootWindowController::CreateSystemBackground(
bool is_first_run_after_boot) {
SkColor color = SK_ColorBLACK;

Powered by Google App Engine
This is Rietveld 408576698