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

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

Issue 250633003: Adds more to viewmanager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: override Created 6 years, 8 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/ids.h ('k') | mojo/services/view_manager/node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/node.h
diff --git a/mojo/services/view_manager/node.h b/mojo/services/view_manager/node.h
index 5892af058e80ae2ae3dd2e9adff0b421a7ace1e7..ed6887428bd19939deb88fdc39f90e6fcb71dab2 100644
--- a/mojo/services/view_manager/node.h
+++ b/mojo/services/view_manager/node.h
@@ -5,6 +5,8 @@
#ifndef MOJO_SERVICES_VIEW_MANAGER_NODE_H_
#define MOJO_SERVICES_VIEW_MANAGER_NODE_H_
+#include <vector>
+
#include "base/logging.h"
#include "mojo/services/view_manager/ids.h"
#include "mojo/services/view_manager/view_manager_export.h"
@@ -16,6 +18,7 @@ namespace services {
namespace view_manager {
class NodeDelegate;
+class View;
// Represents a node in the graph. Delegate is informed of interesting events.
class MOJO_VIEW_MANAGER_EXPORT Node : public aura::WindowObserver {
@@ -33,6 +36,12 @@ class MOJO_VIEW_MANAGER_EXPORT Node : public aura::WindowObserver {
Node* GetParent();
+ std::vector<Node*> GetChildren();
+
+ // Sets the view associated with this node. Node does not own its View.
+ void SetView(View* view);
+ View* view() { return view_; }
+
private:
// WindowObserver overrides:
virtual void OnWindowHierarchyChanged(
@@ -40,7 +49,12 @@ class MOJO_VIEW_MANAGER_EXPORT Node : public aura::WindowObserver {
NodeDelegate* delegate_;
const NodeId id_;
+
+ // Weak pointer to view associated with this node.
+ View* view_;
+
ViewId view_id_;
+
aura::Window window_;
DISALLOW_COPY_AND_ASSIGN(Node);
« no previous file with comments | « mojo/services/view_manager/ids.h ('k') | mojo/services/view_manager/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698