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

Unified Diff: ash/accelerators/accelerator_controller_delegate_aura.cc

Issue 2285633002: Add WM_EVENT_TRUSTED_PIN and WINDOW_STATE_TYPE_TRUSTED_PINNED to Ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 3 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_unittest.cc ('k') | ash/common/wm/default_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_delegate_aura.cc
diff --git a/ash/accelerators/accelerator_controller_delegate_aura.cc b/ash/accelerators/accelerator_controller_delegate_aura.cc
index 87294332ad582ed4943fac84b06fe6d4193386ad..8cce14cc6943498a3fc38241ccfbedafdffedb66 100644
--- a/ash/accelerators/accelerator_controller_delegate_aura.cc
+++ b/ash/accelerators/accelerator_controller_delegate_aura.cc
@@ -223,8 +223,11 @@ void HandleTakeScreenshot(ScreenshotDelegate* screenshot_delegate) {
}
bool CanHandleUnpin() {
+ // Returns true only for WINDOW_STATE_TYPE_PINNED.
+ // WINDOW_STATE_TYPE_TRUSTED_PINNED does not accept user's unpin operation.
wm::WindowState* window_state = wm::GetActiveWindowState();
- return window_state && window_state->IsPinned();
+ return window_state &&
+ window_state->GetStateType() == wm::WINDOW_STATE_TYPE_PINNED;
}
#if defined(OS_CHROMEOS)
« no previous file with comments | « ash/accelerators/accelerator_commands_unittest.cc ('k') | ash/common/wm/default_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698