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

Unified Diff: mojo/services/view_manager/node.cc

Issue 327073003: Reorder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | « mojo/services/view_manager/node.h ('k') | mojo/services/view_manager/root_node_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/node.cc
diff --git a/mojo/services/view_manager/node.cc b/mojo/services/view_manager/node.cc
index 208c9c76fa5c61b1efd6a74df561788c8c8d27f8..cbdd16d712baeb20d7b8bf4c26736acf14c880ad 100644
--- a/mojo/services/view_manager/node.cc
+++ b/mojo/services/view_manager/node.cc
@@ -58,6 +58,13 @@ void Node::Remove(Node* child) {
window_.RemoveChild(&child->window_);
}
+void Node::Reorder(Node* child, Node* relative, OrderDirection direction) {
+ if (direction == ORDER_ABOVE)
+ window_.StackChildAbove(child->window(), relative->window());
+ else if (direction == ORDER_BELOW)
+ window_.StackChildBelow(child->window(), relative->window());
+}
+
const Node* Node::GetRoot() const {
const aura::Window* window = &window_;
while (window && window->parent())
« no previous file with comments | « mojo/services/view_manager/node.h ('k') | mojo/services/view_manager/root_node_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698