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

Unified Diff: mojo/services/view_manager/view.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/root_node_manager.cc ('k') | mojo/services/view_manager/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/view_manager/view.h
diff --git a/mojo/services/view_manager/view.h b/mojo/services/view_manager/view.h
new file mode 100644
index 0000000000000000000000000000000000000000..83251c0214f0dff4053cea8c9d83b1de34596da3
--- /dev/null
+++ b/mojo/services/view_manager/view.h
@@ -0,0 +1,46 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_H_
+#define MOJO_SERVICES_VIEW_MANAGER_VIEW_H_
+
+#include <vector>
+
+#include "base/logging.h"
+#include "mojo/services/view_manager/ids.h"
+#include "mojo/services/view_manager/view_manager_export.h"
+
+namespace mojo {
+namespace services {
+namespace view_manager {
+
+class Node;
+
+// Represents a view. A view may be associated with a single Node.
+class MOJO_VIEW_MANAGER_EXPORT View {
+ public:
+ explicit View(const ViewId& id);
+ ~View();
+
+ const ViewId& id() const { return id_; }
+
+ Node* node() { return node_; }
+
+ private:
+ // Node is responsible for maintaining |node_|.
+ friend class Node;
+
+ void set_node(Node* node) { node_ = node; }
+
+ const ViewId id_;
+ Node* node_;
+
+ DISALLOW_COPY_AND_ASSIGN(View);
+};
+
+} // namespace view_manager
+} // namespace services
+} // namespace mojo
+
+#endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_H_
« no previous file with comments | « mojo/services/view_manager/root_node_manager.cc ('k') | mojo/services/view_manager/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698