summaryrefslogtreecommitdiffstats
path: root/ui/aura/window.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 22:13:27 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 22:13:27 +0000
commit9661035442518ea3fc5cefe2e9439fee8b735fc4 (patch)
tree5b64e8c05556aaa061742f3ed7117477221edba1 /ui/aura/window.h
parent75746b4b91172882cdaf1cc956147317627ad231 (diff)
downloadchromium_src-9661035442518ea3fc5cefe2e9439fee8b735fc4.zip
chromium_src-9661035442518ea3fc5cefe2e9439fee8b735fc4.tar.gz
chromium_src-9661035442518ea3fc5cefe2e9439fee8b735fc4.tar.bz2
Moves transient stacking logic into WindowStackingClient
This is part of moving transient window logic out of Window. BUG=none TEST=covered by tests R=ben@chromium.org Review URL: https://codereview.chromium.org/103813006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240440 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window.h')
-rw-r--r--ui/aura/window.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/ui/aura/window.h b/ui/aura/window.h
index 5ed3ea4..d69d88e 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -68,6 +68,12 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
public ui::EventTarget,
public ui::GestureConsumer {
public:
+ // Used when stacking windows.
+ enum StackDirection {
+ STACK_ABOVE,
+ STACK_BELOW
+ };
+
typedef std::vector<Window*> Windows;
explicit Window(WindowDelegate* delegate);
@@ -378,14 +384,8 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
private:
friend class test::WindowTestApi;
friend class LayoutManager;
- friend class WindowTargeter;
friend class RootWindow;
-
- // Used when stacking windows.
- enum StackDirection {
- STACK_ABOVE,
- STACK_BELOW
- };
+ friend class WindowTargeter;
// Called by the public {Set,Get,Clear}Property functions.
int64 SetPropertyInternal(const void* key,
@@ -445,18 +445,14 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// Called when this window's parent has changed.
void OnParentChanged();
- // Populates |ancestors| with all transient ancestors of |window| that are
- // children of |this|. Returns true if any ancestors were found, false if not.
- bool GetAllTransientAncestors(Window* window, Windows* ancestors) const;
-
- // Replaces two windows |window1| and |window2| with their possible transient
- // ancestors that are still siblings (have a common transient parent).
- // |window1| and |window2| are not modified if such ancestors cannot be found.
- void FindCommonSiblings(Window** window1, Window** window2) const;
-
// Returns true when |ancestor| is a transient ancestor of |this|.
bool HasTransientAncestor(const Window* ancestor) const;
+ // Adjusts |target| so that we don't attempt to stack on top of a window with
+ // a NULL delegate. See implementation for details.
+ void SkipNullDelegatesForStacking(StackDirection direction,
+ Window** target) const;
+
// Determines the real location for stacking |child| and invokes
// StackChildRelativeToImpl().
void StackChildRelativeTo(Window* child,