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

Unified Diff: ash/wm/dock/docked_window_layout_manager.h

Issue 597683003: Add window states docked; and docked minimized. Add wm window event to set docked and undocked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dock
Patch Set: Pull forward a change from the dependant CL to this Created 6 years, 2 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/wm/default_state.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_layout_manager.h
diff --git a/ash/wm/dock/docked_window_layout_manager.h b/ash/wm/dock/docked_window_layout_manager.h
index 51b302ec3cf0bfeab47e1605d50dc4e2a953afd5..174eeae6aa81ec5f37c8cb87401662a6ab52738c 100644
--- a/ash/wm/dock/docked_window_layout_manager.h
+++ b/ash/wm/dock/docked_window_layout_manager.h
@@ -107,6 +107,11 @@ class ASH_EXPORT DockedWindowLayoutManager
// Records |action| by |source| in UMA.
void FinishDragging(DockedAction action, DockedActionSource source);
+ // Checks the rules and possibly updates the docked layout to match
+ // the |alignment|. May not apply the |alignment| when
+ // the current shelf alignment conflicts. Never clears the |alignment_|.
+ void MaybeSetDesiredDockedAlignment(DockedAlignment alignment);
+
Shelf* shelf() { return shelf_; }
void SetShelf(Shelf* shelf);
@@ -183,6 +188,13 @@ class ASH_EXPORT DockedWindowLayoutManager
// Ideal (starting) width of the dock.
static const int kIdealWidth;
+ // Returns the alignment of the docked windows other than the |child|.
+ DockedAlignment CalculateAlignmentExcept(const aura::Window* child) const;
+
+ // Determines if the |alignment| is applicable taking into account
+ // the shelf alignment.
+ bool IsDockedAlignmentValid(DockedAlignment alignment) const;
+
// Keep at most kMaxVisibleWindows visible in the dock and minimize the rest
// (except for |child|).
void MaybeMinimizeChildrenExcept(aura::Window* child);
« no previous file with comments | « ash/wm/default_state.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698