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

Unified Diff: ash/common/wm/maximize_mode/maximize_mode_window_state.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/common/wm/default_state.cc ('k') | ash/common/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/maximize_mode/maximize_mode_window_state.cc
diff --git a/ash/common/wm/maximize_mode/maximize_mode_window_state.cc b/ash/common/wm/maximize_mode/maximize_mode_window_state.cc
index d0d76ba54e1e86f3a695f44bbb640404245304e7..ccdd2d265dc551ef48efbcc7322951e0d2084483 100644
--- a/ash/common/wm/maximize_mode/maximize_mode_window_state.cc
+++ b/ash/common/wm/maximize_mode/maximize_mode_window_state.cc
@@ -11,9 +11,10 @@
#include "ash/common/wm/window_state_util.h"
#include "ash/common/wm/wm_event.h"
#include "ash/common/wm/wm_screen_util.h"
-#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/public/cpp/shell_window_ids.h"
+#include "ash/shell.h"
+#include "ash/wm/screen_pinning_controller.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/geometry/rect.h"
@@ -128,11 +129,11 @@ void MaximizeModeWindowState::OnWMEvent(wm::WindowState* window_state,
UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_FULLSCREEN, true);
break;
case wm::WM_EVENT_PIN:
- if (!WmShell::Get()->IsPinned())
+ if (!Shell::Get()->screen_pinning_controller()->IsPinned())
UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_PINNED, true);
break;
case wm::WM_EVENT_TRUSTED_PIN:
- if (!WmShell::Get()->IsPinned())
+ if (!Shell::Get()->screen_pinning_controller()->IsPinned())
UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_TRUSTED_PINNED, true);
break;
case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION:
@@ -281,7 +282,8 @@ void MaximizeModeWindowState::UpdateWindow(wm::WindowState* window_state,
target_state == wm::WINDOW_STATE_TYPE_PINNED ||
old_state_type == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED ||
target_state == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED) {
- WmShell::Get()->SetPinnedWindow(window_state->window());
+ Shell::Get()->screen_pinning_controller()->SetPinnedWindow(
+ window_state->window());
}
if ((window_state->window()->GetTargetVisibility() ||
« no previous file with comments | « ash/common/wm/default_state.cc ('k') | ash/common/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698