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

Unified Diff: ash/common/wm_shell.h

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/common/wm/workspace/workspace_layout_manager.cc ('k') | ash/common/wm_shell_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.h
diff --git a/ash/common/wm_shell.h b/ash/common/wm_shell.h
index 704a075b00a2ca15a91d1adafa6963db2a55edbb..5bfb905ff1f88845aa309f9e6075883053807a0a 100644
--- a/ash/common/wm_shell.h
+++ b/ash/common/wm_shell.h
@@ -86,6 +86,18 @@ class ASH_EXPORT WmShell {
simulate_modal_window_open_for_testing_ = modal_window_open;
}
+ // Returns true if a window is currently pinned.
+ virtual bool IsPinned() = 0;
+
+ // Sets/Unsets the |window| to as a pinned window. If this is called with a
+ // window with WINDOW_STATE_TYPE_PINNED state, then this sets the |window|
+ // as a pinned window. Otherwise, this unsets it.
+ // For setting, a caller needs to guarantee that no windows are set
+ // as pinned window. For unsetting, a caller needs to guarantee that the
+ // |window| is the one which is currently set as a pinned window via previous
+ // this function invocation.
+ virtual void SetPinnedWindow(WmWindow* window) = 0;
+
// Returns true if |window| can be shown for the current user. This is
// intended to check if the current user matches the user associated with
// |window|.
@@ -133,11 +145,6 @@ class ASH_EXPORT WmShell {
virtual void AddShellObserver(ShellObserver* observer) = 0;
virtual void RemoveShellObserver(ShellObserver* observer) = 0;
- // Notifies |observers_| when entering or exiting pinned mode for
- // |pinned_window|. Entering or exiting can be checked by looking at
- // |pinned_window|'s window state.
- virtual void NotifyPinnedStateChanged(WmWindow* pinned_window) = 0;
-
protected:
WmShell();
virtual ~WmShell();
« no previous file with comments | « ash/common/wm/workspace/workspace_layout_manager.cc ('k') | ash/common/wm_shell_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698