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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 2072853002: Implement "pinned" mode in ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linux build breakage Created 4 years, 6 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/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index d9dbbf696eb1bdc892df6d3387876212a2d9a5f9..6407577ae1efc6e085c3a066bc9dcd10caa3fcfd 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -1402,6 +1402,10 @@ bool AcceleratorController::ShouldActionConsumeKeyEvent(
AcceleratorController::AcceleratorProcessingRestriction
AcceleratorController::GetAcceleratorProcessingRestriction(int action) {
+ if (WmShell::Get()->IsPinned() &&
+ reserved_actions_.find(action) == reserved_actions_.end()) {
+ return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
+ }
oshima 2016/06/17 10:26:53 won't this also prevent power/audio accelerators?
hidehiko 2016/06/17 17:19:21 Good point. I added the table, based on the refere
ash::Shell* shell = ash::Shell::GetInstance();
if (!shell->session_state_delegate()->IsActiveUserSessionStarted() &&
actions_allowed_at_login_screen_.find(action) ==

Powered by Google App Engine
This is Rietveld 408576698