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

Unified Diff: ash/shell.cc

Issue 47873003: Add a full screen virtual keyboard to virtual keyboard root window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index e97959e8e006721cc4da82e490a3a021dad2393c..9879f9358592e91f5bf89ec70a2322922e9f3fc4 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -23,6 +23,7 @@
#include "ash/display/mouse_cursor_event_filter.h"
#include "ash/display/resolution_notification_controller.h"
#include "ash/display/screen_position_controller.h"
+#include "ash/display/virtual_keyboard_window_controller.h"
#include "ash/drag_drop/drag_drop_controller.h"
#include "ash/first_run/first_run_helper_impl.h"
#include "ash/focus_cycler.h"
@@ -335,16 +336,13 @@ void Shell::SetDisplayWorkAreaInsets(Window* contains,
}
void Shell::OnLoginStateChanged(user::LoginStatus status) {
- if (status != user::LOGGED_IN_NONE) {
- // TODO(bshe): Primary root window controller may not be the controller to
- // attach virtual keyboard. See http://crbug.com/303429
- InitKeyboard(GetPrimaryRootWindowController());
- GetPrimaryRootWindowController()->ActivateKeyboard(
- keyboard_controller_.get());
- }
FOR_EACH_OBSERVER(ShellObserver, observers_, OnLoginStateChanged(status));
}
+void Shell::OnLoginUserProfilePrepared() {
+ CreateKeyboard();
+}
+
void Shell::UpdateAfterLoginStatusChange(user::LoginStatus status) {
RootWindowControllerList controllers = GetAllRootWindowControllers();
for (RootWindowControllerList::iterator iter = controllers.begin();
@@ -379,6 +377,20 @@ void Shell::CreateLauncher() {
(*iter)->shelf()->CreateLauncher();
}
+void Shell::CreateKeyboard() {
+ // TODO(bshe): Primary root window controller may not be the controller to
+ // attach virtual keyboard. See http://crbug.com/303429
+ internal::RootWindowController* root_window_controller = NULL;
+ if (keyboard::IsKeyboardUsabilityTestEnabled()) {
+ root_window_controller = display_controller()->
+ virtual_keyboard_window_controller()->root_window_controller();
oshima 2013/11/01 00:09:02 Can't you create the keyboard for this mode in Vir
bshe 2013/11/12 15:28:33 Done.
+ } else {
+ root_window_controller = GetPrimaryRootWindowController();
+ }
+ InitKeyboard(root_window_controller);
+ root_window_controller->ActivateKeyboard(keyboard_controller_.get());
+}
+
void Shell::ShowLauncher() {
RootWindowControllerList controllers = GetAllRootWindowControllers();
for (RootWindowControllerList::iterator iter = controllers.begin();
@@ -696,7 +708,7 @@ void Shell::Init() {
output_configurator_animation_.reset(
new internal::OutputConfiguratorAnimation());
output_configurator_->AddObserver(output_configurator_animation_.get());
- if (command_line->HasSwitch(keyboard::switches::kKeyboardUsabilityTest)) {
+ if (keyboard::IsKeyboardUsabilityTestEnabled()) {
display_manager_->SetSecondDisplayMode(
internal::DisplayManager::VIRTUAL_KEYBOARD);
}

Powered by Google App Engine
This is Rietveld 408576698