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

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: Address varkha's comments from patch set 4. Created 6 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
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..988fa03617504933e668c4fdeaa41370395987c9 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);
+ // Request the desired dock alignment. The alginment adjustment may not
+ // be applied as it may not be available; for example if the shelf
+ // is in the requested place; the transformation won't be applied.
+ void RequestDesiredDockedAlignment(DockedAlignment desired_alignment);
varkha 2014/09/30 20:15:21 From the comment sounds like MaybeSetDesiredDocked
dtapuska 2014/10/01 15:01:34 Done.
+
Shelf* shelf() { return shelf_; }
void SetShelf(Shelf* shelf);
@@ -183,6 +188,16 @@ class ASH_EXPORT DockedWindowLayoutManager
// Ideal (starting) width of the dock.
static const int kIdealWidth;
+ // Calculate the alignment of the dock; the children need to be traversed;
+ // and the |child| should be skipped in the calculation. The computed dock
+ // alignment is returned.
+ DockedAlignment CalculateDockedAlignmentExcept(const aura::Window* child)
varkha 2014/09/30 20:15:19 nit: How about CalculateAlignmentExcept? nit: Calc
dtapuska 2014/10/01 15:01:34 Done.
+ const;
+
+ // Determine if the |desired_alignment| is applicable taking into account
varkha 2014/09/30 20:15:21 I think this is IsDockedAlignmentValid. nits: s/de
dtapuska 2014/10/01 15:01:34 Done.
+ // the location of the shelf.
+ bool IsDockedAlignmentApplicable(DockedAlignment desired_alignment) const;
+
// Keep at most kMaxVisibleWindows visible in the dock and minimize the rest
// (except for |child|).
void MaybeMinimizeChildrenExcept(aura::Window* child);

Powered by Google App Engine
This is Rietveld 408576698