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

Unified Diff: ash/common/wm/default_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/shelf/shelf_layout_manager.cc ('k') | ash/common/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/default_state.cc
diff --git a/ash/common/wm/default_state.cc b/ash/common/wm/default_state.cc
index e6b5ab3b9d07151cc695377a78705476e58f5a59..109e9cf47f611a5d9cf657ed01d1ddef2bc97921 100644
--- a/ash/common/wm/default_state.cc
+++ b/ash/common/wm/default_state.cc
@@ -16,6 +16,8 @@
#include "ash/common/wm_window.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
+#include "ash/shell.h"
+#include "ash/wm/screen_pinning_controller.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
@@ -136,7 +138,7 @@ void DefaultState::OnWMEvent(WindowState* window_state, const WMEvent* event) {
// to this window.
// TODO(hidehiko): If a system modal window is openening, the pinning
// probably should fail.
- if (WmShell::Get()->IsPinned()) {
+ if (Shell::Get()->screen_pinning_controller()->IsPinned()) {
LOG(ERROR) << "An PIN event will be failed since another window is "
<< "already in pinned mode.";
next_state_type = current_state_type;
@@ -523,7 +525,8 @@ void DefaultState::EnterToNextState(WindowState* window_state,
previous_state_type == WINDOW_STATE_TYPE_PINNED ||
next_state_type == WINDOW_STATE_TYPE_TRUSTED_PINNED ||
previous_state_type == WINDOW_STATE_TYPE_TRUSTED_PINNED) {
- WmShell::Get()->SetPinnedWindow(window_state->window());
+ Shell::Get()->screen_pinning_controller()->SetPinnedWindow(
+ window_state->window());
}
}
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/common/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698