| Index: ash/accelerators/accelerator_controller.cc
|
| diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
|
| index 2aa4ceb3622b4d5fecdbd69a189d7e7aae38395e..b2317cefbb0802e10fe58195dc2b7e86e3312002 100644
|
| --- a/ash/accelerators/accelerator_controller.cc
|
| +++ b/ash/accelerators/accelerator_controller.cc
|
| @@ -921,6 +921,8 @@ void AcceleratorController::Init() {
|
| actions_needing_window_.insert(kActionsNeedingWindow[i]);
|
| for (size_t i = 0; i < kActionsKeepingMenuOpenLength; ++i)
|
| actions_keeping_menu_open_.insert(kActionsKeepingMenuOpen[i]);
|
| + for (size_t i = 0; i < kActionsAllowedInPinnedModeLength; ++i)
|
| + actions_allowed_in_pinned_mode_.insert(kActionsAllowedInPinnedMode[i]);
|
|
|
| RegisterAccelerators(kAcceleratorData, kAcceleratorDataLength);
|
|
|
| @@ -1399,6 +1401,13 @@ bool AcceleratorController::ShouldActionConsumeKeyEvent(
|
|
|
| AcceleratorController::AcceleratorProcessingRestriction
|
| AcceleratorController::GetAcceleratorProcessingRestriction(int action) {
|
| + if (WmShell::Get()->IsPinned() &&
|
| + actions_allowed_in_pinned_mode_.find(action) ==
|
| + actions_allowed_in_pinned_mode_.end() &&
|
| + actions_allowed_in_app_mode_.find(action) ==
|
| + actions_allowed_in_app_mode_.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) ==
|
|
|