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

Unified Diff: ash/common/wm/workspace/workspace_layout_manager.cc

Issue 2784603002: Makes ScreenPinningController clear map after removing observers (Closed)
Patch Set: feedback and merge 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/workspace/workspace_layout_manager.cc
diff --git a/ash/common/wm/workspace/workspace_layout_manager.cc b/ash/common/wm/workspace/workspace_layout_manager.cc
index 6ccf018160184e386fdf2d5cdeac5fdae58f91d7..8ae1e3fe6aebf390f04556d6a80b339c5bd32a0a 100644
--- a/ash/common/wm/workspace/workspace_layout_manager.cc
+++ b/ash/common/wm/workspace/workspace_layout_manager.cc
@@ -320,7 +320,8 @@ void WorkspaceLayoutManager::OnFullscreenStateChanged(bool is_fullscreen,
}
void WorkspaceLayoutManager::OnPinnedStateChanged(WmWindow* pinned_window) {
- if (!WmShell::Get()->IsPinned() && is_fullscreen_) {
+ const bool is_pinned = WmShell::Get()->IsPinned();
+ if (!is_pinned && is_fullscreen_) {
// On exiting from pinned mode, if the workspace is still in fullscreen
// mode, then this event does not trigger the restoring yet. On exiting
// from fullscreen, the temporarily disabled always-on-top property will be
@@ -328,7 +329,7 @@ void WorkspaceLayoutManager::OnPinnedStateChanged(WmWindow* pinned_window) {
return;
}
- UpdateAlwaysOnTop(WmShell::Get()->IsPinned() ? pinned_window : nullptr);
+ UpdateAlwaysOnTop(is_pinned ? pinned_window : nullptr);
}
void WorkspaceLayoutManager::OnVirtualKeyboardStateChanged(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698