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

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: 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 76f68db4b14eced93cb33460747d9f9740ae7ea7..f466168be7d42c66731073194e567565222ec6fe 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -1416,6 +1416,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;
+ }
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