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

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: Added trusted argument. Created 4 years, 4 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
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 654edd57b44a4a8ebadda05b631ca00f2ec11d44..0a9c88f5fcd39aa23f6d627933ccf8df6181f7fa 100644
--- a/ash/accelerators/accelerator_controller_delegate_aura.cc
+++ b/ash/accelerators/accelerator_controller_delegate_aura.cc
@@ -314,8 +314,11 @@ void HandleToggleDesktopBackgroundMode() {
}
bool CanHandleUnpin() {
hidehiko 2016/08/29 14:31:38 Looks to work practically, but is it ok to leave U
hirono 2016/08/30 07:16:08 I tried to create a new list in accelerator_table.
+ // 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)

Powered by Google App Engine
This is Rietveld 408576698