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

Unified Diff: ash/common/accelerators/accelerator_controller.cc

Issue 2256283003: Refuse to show Alt+Tab UI concurrently with virtual keyboard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no op instead Created 4 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_controller.cc
diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
index ef5c7a35a53c28bbc2c95142087066724dde609d..06233492911adac5de255aed34f51df67fdd24f1 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -33,6 +33,7 @@
#include "base/metrics/user_metrics.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/accelerator_manager.h"
+#include "ui/keyboard/keyboard_controller.h"
#if defined(OS_CHROMEOS)
#include "chromeos/dbus/dbus_thread_manager.h"
@@ -924,12 +925,12 @@ bool AcceleratorController::ShouldActionConsumeKeyEvent(
AcceleratorController::AcceleratorProcessingRestriction
AcceleratorController::GetAcceleratorProcessingRestriction(int action) {
varkha 2016/08/22 20:59:23 Maybe deserves a followup. Is there a good reason
Evan Stade 2016/08/22 21:35:04 dunno, seems tangential to this CL though.
- if (WmShell::Get()->IsPinned() &&
+ WmShell* wm_shell = WmShell::Get();
+ if (wm_shell->IsPinned() &&
actions_allowed_in_pinned_mode_.find(action) ==
actions_allowed_in_pinned_mode_.end()) {
return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
}
- WmShell* wm_shell = WmShell::Get();
if (!wm_shell->GetSessionStateDelegate()->IsActiveUserSessionStarted() &&
actions_allowed_at_login_screen_.find(action) ==
actions_allowed_at_login_screen_.end()) {
@@ -960,6 +961,13 @@ AcceleratorController::GetAcceleratorProcessingRestriction(int action) {
A11Y_ALERT_WINDOW_NEEDED);
return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
}
+ // Don't do anything when Alt+Tab comes from a virtual keyboard. Touchscreen
+ // users have better window switching options. See http://crbug.com/638269
+ keyboard::KeyboardController* keyboard_controller =
+ keyboard::KeyboardController::GetInstance();
+ if (keyboard_controller && keyboard_controller->keyboard_visible())
+ return RESTRICTION_PREVENT_PROCESSING;
oshima 2016/08/18 23:53:31 This disable alt-tab even if I used the real keybo
varkha 2016/08/22 20:59:23 Maybe we can plumb through a ui::Accelerator param
bshe 2016/08/22 21:02:56 If alt + tab is disabled for VK, it is probably be
Evan Stade 2016/08/22 21:35:04 seems very not worth it. Why is a user using both
Evan Stade 2016/08/22 21:35:04 How would one do that? By special casing to ignore
+
return RESTRICTION_NONE;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698