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

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

Issue 2780943002: Enables ScreenPinningController for mash/mus (Closed)
Patch Set: local Created 3 years, 9 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 | « ash/aura/wm_shell_aura.cc ('k') | ash/common/shelf/shelf_layout_manager.cc » ('j') | 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 4bdf93bbb8af4ccedbbbf11a5d93fb50874ec7e3..a1cf527d5d13f1d09d25b21f832b42c268fa30dd 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -45,6 +45,7 @@
#include "ash/rotator/window_rotation.h"
#include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h"
+#include "ash/wm/screen_pinning_controller.h"
#include "ash/wm/window_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
@@ -1226,8 +1227,7 @@ bool AcceleratorController::ShouldActionConsumeKeyEvent(
AcceleratorController::AcceleratorProcessingRestriction
AcceleratorController::GetAcceleratorProcessingRestriction(int action) const {
- WmShell* wm_shell = WmShell::Get();
- if (wm_shell->IsPinned() &&
+ if (Shell::Get()->screen_pinning_controller()->IsPinned() &&
actions_allowed_in_pinned_mode_.find(action) ==
actions_allowed_in_pinned_mode_.end()) {
return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
@@ -1247,7 +1247,7 @@ AcceleratorController::GetAcceleratorProcessingRestriction(int action) const {
actions_allowed_in_app_mode_.end()) {
return RESTRICTION_PREVENT_PROCESSING;
}
- if (wm_shell->IsSystemModalWindowOpen() &&
+ if (WmShell::Get()->IsSystemModalWindowOpen() &&
actions_allowed_at_modal_window_.find(action) ==
actions_allowed_at_modal_window_.end()) {
// Note we prevent the shortcut from propagating so it will not
« no previous file with comments | « ash/aura/wm_shell_aura.cc ('k') | ash/common/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698