Commit 62c695fd authored by yilkal's avatar yilkal Committed by Commit Bot

Remove KioskNext code from accelerator controller.

Bug: 977019
Change-Id: Ieb42dab51dc15ce636363e6969311762588bcf91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1684812
Commit-Queue: Yilkal Abe <yilkal@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#676579}
parent 70a3ceff
......@@ -26,7 +26,6 @@
#include "ash/ime/ime_controller.h"
#include "ash/ime/ime_switch_type.h"
#include "ash/keyboard/ui/keyboard_ui_controller.h"
#include "ash/kiosk_next/kiosk_next_shell_controller_impl.h"
#include "ash/magnifier/docked_magnifier_controller_impl.h"
#include "ash/magnifier/magnification_controller.h"
#include "ash/media/media_controller_impl.h"
......@@ -1441,10 +1440,6 @@ void AcceleratorControllerImpl::Init() {
actions_allowed_in_pinned_mode_.insert(
kActionsAllowedInAppModeOrPinnedMode[i]);
}
for (size_t i = 0; i < kActionsAllowedForKioskNextShellLength; i++) {
actions_allowed_for_kiosk_next_shell_.insert(
kActionsAllowedForKioskNextShell[i]);
}
for (size_t i = 0; i < kActionsAllowedInPinnedModeLength; ++i)
actions_allowed_in_pinned_mode_.insert(kActionsAllowedInPinnedMode[i]);
for (size_t i = 0; i < kActionsNeedingWindowLength; ++i)
......@@ -2016,10 +2011,6 @@ bool AcceleratorControllerImpl::ShouldActionConsumeKeyEvent(
AcceleratorControllerImpl::AcceleratorProcessingRestriction
AcceleratorControllerImpl::GetAcceleratorProcessingRestriction(
int action) const {
if (Shell::Get()->kiosk_next_shell_controller()->IsEnabled() &&
actions_allowed_for_kiosk_next_shell_.count(action) == 0) {
return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
}
if (Shell::Get()->screen_pinning_controller()->IsPinned() &&
actions_allowed_in_pinned_mode_.find(action) ==
actions_allowed_in_pinned_mode_.end()) {
......
......@@ -304,8 +304,6 @@ class ASH_EXPORT AcceleratorControllerImpl : public ui::AcceleratorTarget,
std::set<int> actions_allowed_in_app_mode_;
// Actions allowed in pinned mode.
std::set<int> actions_allowed_in_pinned_mode_;
// Actions allowed when Kiosk Next Shell is enabled.
std::set<int> actions_allowed_for_kiosk_next_shell_;
// Actions disallowed if there are no windows.
std::set<int> actions_needing_window_;
// Actions that can be performed without closing the menu (if one is present).
......
......@@ -375,34 +375,4 @@ const AcceleratorAction kActionsKeepingMenuOpen[] = {
const size_t kActionsKeepingMenuOpenLength =
base::size(kActionsKeepingMenuOpen);
const AcceleratorAction kActionsAllowedForKioskNextShell[] = {
BRIGHTNESS_DOWN,
BRIGHTNESS_UP,
DEBUG_TOGGLE_SHOW_DEBUG_BORDERS,
DEBUG_TOGGLE_SHOW_FPS_COUNTER,
DEBUG_TOGGLE_SHOW_PAINT_RECTS,
KEYBOARD_BRIGHTNESS_DOWN,
KEYBOARD_BRIGHTNESS_UP,
MEDIA_NEXT_TRACK,
MEDIA_PLAY_PAUSE,
MEDIA_PREV_TRACK,
POWER_PRESSED,
POWER_RELEASED,
TAKE_PARTIAL_SCREENSHOT,
TAKE_SCREENSHOT,
TAKE_WINDOW_SCREENSHOT,
TOGGLE_CAPS_LOCK,
TOGGLE_DICTATION,
TOGGLE_DOCKED_MAGNIFIER,
TOGGLE_FULLSCREEN_MAGNIFIER,
TOGGLE_HIGH_CONTRAST,
TOGGLE_SPOKEN_FEEDBACK,
VOLUME_DOWN,
VOLUME_MUTE,
VOLUME_UP,
};
const size_t kActionsAllowedForKioskNextShellLength =
base::size(kActionsAllowedForKioskNextShell);
} // namespace ash
......@@ -155,10 +155,6 @@ ASH_EXPORT extern const size_t kActionsNeedingWindowLength;
ASH_EXPORT extern const AcceleratorAction kActionsKeepingMenuOpen[];
ASH_EXPORT extern const size_t kActionsKeepingMenuOpenLength;
// Actions that can be performed when the Kiosk Next Shell is enabled.
ASH_EXPORT extern const AcceleratorAction kActionsAllowedForKioskNextShell[];
ASH_EXPORT extern const size_t kActionsAllowedForKioskNextShellLength;
} // namespace ash
#endif // ASH_ACCELERATORS_ACCELERATOR_TABLE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment