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

Unified Diff: ash/accelerators/accelerator_commands.cc

Issue 2078883003: Handle UNPIN operation 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/accelerators/accelerator_commands.h ('k') | ash/accelerators/accelerator_commands_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_commands.cc
diff --git a/ash/accelerators/accelerator_commands.cc b/ash/accelerators/accelerator_commands.cc
index 94cc0566860e41e0fe8d14d668d3347c1ff8f4f8..5ab32bf924ca8566fc403036c6e003dfbe45e636 100644
--- a/ash/accelerators/accelerator_commands.cc
+++ b/ash/accelerators/accelerator_commands.cc
@@ -12,6 +12,7 @@
#include "ash/display/display_util.h"
#include "ash/shell.h"
#include "ash/shell_delegate.h"
+#include "ash/wm/screen_pinning_controller.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
#include "base/metrics/user_metrics.h"
@@ -107,5 +108,12 @@ void ResetInternalDisplayZoom() {
}
}
+void Unpin() {
+ WmWindow* pinned_window =
+ Shell::GetInstance()->screen_pinning_controller()->pinned_window();
+ if (pinned_window)
+ pinned_window->GetWindowState()->Restore();
+}
+
} // namespace accelerators
} // namespace ash
« no previous file with comments | « ash/accelerators/accelerator_commands.h ('k') | ash/accelerators/accelerator_commands_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698