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

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_state.cc

Issue 2072853002: Implement "pinned" mode in ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 6 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/shell.cc ('k') | ash/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/wm/maximize_mode/maximize_mode_window_state.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_state.cc b/ash/wm/maximize_mode/maximize_mode_window_state.cc
index 6d6259e55052b5e145c601602ef2eac84d6d9120..e0b0a9f69509fe8b81b15222317365e8c97d3600 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_state.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_state.cc
@@ -130,7 +130,8 @@ void MaximizeModeWindowState::OnWMEvent(wm::WindowState* window_state,
UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_FULLSCREEN, true);
break;
case wm::WM_EVENT_PIN:
- UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_PINNED, true);
+ if (!WmShell::Get()->IsPinned())
+ UpdateWindow(window_state, wm::WINDOW_STATE_TYPE_PINNED, true);
break;
case wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION:
case wm::WM_EVENT_TOGGLE_VERTICAL_MAXIMIZE:
@@ -281,7 +282,7 @@ void MaximizeModeWindowState::UpdateWindow(wm::WindowState* window_state,
if (old_state_type == wm::WINDOW_STATE_TYPE_PINNED ||
target_state == wm::WINDOW_STATE_TYPE_PINNED) {
- WmShell::Get()->NotifyPinnedStateChanged(window_state->window());
+ WmShell::Get()->SetPinnedWindow(window_state->window());
}
if ((window_state->window()->GetTargetVisibility() ||
« no previous file with comments | « ash/shell.cc ('k') | ash/wm/overview/window_selector_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698