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

Unified Diff: ash/virtual_keyboard_controller.cc

Issue 970983003: Fix Virtual Keyboard not being deployed in TouchView mode on Ozone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added suppression test. Created 5 years, 10 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 | « no previous file | ash/virtual_keyboard_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/virtual_keyboard_controller.cc
diff --git a/ash/virtual_keyboard_controller.cc b/ash/virtual_keyboard_controller.cc
index 3ecc0bc271c1f3164438eebbd4b1c4ef2de29217..2f46e5cdac97fe733c388e375ff4b2b7c09cadec 100644
--- a/ash/virtual_keyboard_controller.cc
+++ b/ash/virtual_keyboard_controller.cc
@@ -50,13 +50,19 @@ VirtualKeyboardController::~VirtualKeyboardController() {
}
void VirtualKeyboardController::OnMaximizeModeStarted() {
- if (!IsSmartVirtualKeyboardEnabled())
+ if (!IsSmartVirtualKeyboardEnabled()) {
SetKeyboardEnabled(true);
+ } else {
+ UpdateKeyboardEnabled();
+ }
}
void VirtualKeyboardController::OnMaximizeModeEnded() {
- if (!IsSmartVirtualKeyboardEnabled())
+ if (!IsSmartVirtualKeyboardEnabled()) {
SetKeyboardEnabled(false);
+ } else {
+ UpdateKeyboardEnabled();
+ }
}
void VirtualKeyboardController::OnTouchscreenDeviceConfigurationChanged() {
@@ -103,11 +109,16 @@ void VirtualKeyboardController::UpdateKeyboardEnabled() {
->IsMaximizeModeWindowManagerEnabled());
return;
}
- SetKeyboardEnabled(!has_internal_keyboard_ && has_touchscreen_ &&
+ bool ignore_internal_keyboard = Shell::GetInstance()
+ ->maximize_mode_controller()
+ ->IsMaximizeModeWindowManagerEnabled();
+ bool is_internal_keyboard_active =
+ has_internal_keyboard_ && !ignore_internal_keyboard;
+ SetKeyboardEnabled(!is_internal_keyboard_active && has_touchscreen_ &&
(!has_external_keyboard_ || ignore_external_keyboard_));
ash::Shell::GetInstance()
->system_tray_notifier()
- ->NotifyVirtualKeyboardSuppressionChanged(!has_internal_keyboard_ &&
+ ->NotifyVirtualKeyboardSuppressionChanged(!is_internal_keyboard_active &&
has_touchscreen_ &&
has_external_keyboard_);
}
« no previous file with comments | « no previous file | ash/virtual_keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698