summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 22:02:17 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-29 22:02:17 +0000
commitef0a1b06ea55ec7d2e375ba4333ab8be048a7e21 (patch)
treed0e450dee7fd9560d126c4f82051f46161c945be /ui/aura
parent3d298dd0eee3e8556956e40478ea67668bb7f608 (diff)
downloadchromium_src-ef0a1b06ea55ec7d2e375ba4333ab8be048a7e21.zip
chromium_src-ef0a1b06ea55ec7d2e375ba4333ab8be048a7e21.tar.gz
chromium_src-ef0a1b06ea55ec7d2e375ba4333ab8be048a7e21.tar.bz2
Reorder the NativeViews attached to a view via the kViewHostKey according to the position of the view in the view hierarchy.
BUG=237650 Test=NativeWidgetAuraTest.* Review URL: https://chromiumcodereview.appspot.com/15114002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202987 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/window.cc6
-rw-r--r--ui/aura/window.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index c1f7487..5160bf6 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -340,6 +340,12 @@ void Window::StackChildAbove(Window* child, Window* target) {
StackChildRelativeTo(child, target, STACK_ABOVE);
}
+void Window::StackChildAtBottom(Window* child) {
+ if (children_.size() <= 1 || child == children_.front())
+ return; // At the bottom already.
+ StackChildBelow(child, children_.front());
+}
+
void Window::StackChildBelow(Window* child, Window* target) {
StackChildRelativeTo(child, target, STACK_BELOW);
}
diff --git a/ui/aura/window.h b/ui/aura/window.h
index e2c0d83..cd6fa63 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -175,6 +175,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate,
// see WindowTest.StackingMadrigal for details.
void StackChildAbove(Window* child, Window* target);
+ // Stacks the specified child of this window at the bottom of the z-order.
+ void StackChildAtBottom(Window* child);
+
// Stacks |child| below |target|. Does nothing if |child| is already below
// |target|.
void StackChildBelow(Window* child, Window* target);