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

Unified Diff: ash/shell.cc

Issue 613343005: Automatic deployment of the virtual keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. Created 6 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
« no previous file with comments | « ash/shell.h ('k') | ash/virtual_keyboard_controller.h » ('j') | 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 73bfb998ef8daa1be27acd144ae8ed04b34e5e11..152e65eb2f4053f4d4e22d9205d43b3f928f03e4 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -53,7 +53,6 @@
#include "ash/system/status_area_widget.h"
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/system_tray_notifier.h"
-#include "ash/virtual_keyboard_controller.h"
#include "ash/wm/app_list_controller.h"
#include "ash/wm/ash_focus_rules.h"
#include "ash/wm/ash_native_cursor_manager.h"
@@ -136,6 +135,7 @@
#include "ash/system/chromeos/power/video_activity_notifier.h"
#include "ash/system/chromeos/session/last_window_closed_logout_reminder.h"
#include "ash/system/chromeos/session/logout_confirmation_controller.h"
+#include "ash/virtual_keyboard_controller.h"
#include "base/bind_helpers.h"
#include "base/sys_info.h"
#include "chromeos/dbus/dbus_thread_manager.h"
@@ -794,7 +794,9 @@ Shell::~Shell() {
display_manager_->CreateScreenForShutdown();
display_controller_->Shutdown();
display_controller_.reset();
+#if defined(OS_CHROMEOS)
virtual_keyboard_controller_.reset();
+#endif
screen_position_controller_.reset();
accessibility_delegate_.reset();
new_window_delegate_.reset();
@@ -886,7 +888,6 @@ void Shell::Init(const ShellInitParams& init_params) {
display_controller_->Start();
display_controller_->CreatePrimaryHost(
ShellInitParamsToAshWindowTreeHostInitParams(init_params));
- virtual_keyboard_controller_.reset(new VirtualKeyboardController);
aura::Window* root_window = display_controller_->GetPrimaryRootWindow();
target_root_window_ = root_window;
@@ -1031,6 +1032,12 @@ void Shell::Init(const ShellInitParams& init_params) {
display_controller_->InitDisplays();
+#if defined(OS_CHROMEOS)
+ // Needs to be created after InitDisplays() since it may cause the virtual
+ // keyboard to be deployed.
+ virtual_keyboard_controller_.reset(new VirtualKeyboardController);
+#endif // defined(OS_CHROMEOS)
+
// It needs to be created after RootWindowController has been created
// (which calls OnWindowResized has been called, otherwise the
// widget will not paint when restoring after a browser crash. Also it needs
« no previous file with comments | « ash/shell.h ('k') | ash/virtual_keyboard_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698