| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_TREE_NODE_PRIVATE_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_TREE_NODE_PRIVATE_H_ |
| 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_TREE_NODE_PRIVATE_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_TREE_NODE_PRIVATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 | 11 |
| 12 #include "mojo/services/public/cpp/view_manager/view_tree_node.h" | 12 #include "mojo/services/public/cpp/view_manager/view_tree_node.h" |
| 13 | 13 |
| 14 namespace mojo { | 14 namespace mojo { |
| 15 namespace services { | 15 namespace services { |
| 16 namespace view_manager { | 16 namespace view_manager { |
| 17 | 17 |
| 18 class ViewTreeNodePrivate { | 18 class ViewTreeNodePrivate { |
| 19 public: | 19 public: |
| 20 explicit ViewTreeNodePrivate(ViewTreeNode* node); | 20 explicit ViewTreeNodePrivate(ViewTreeNode* node); |
| 21 ~ViewTreeNodePrivate(); | 21 ~ViewTreeNodePrivate(); |
| 22 | 22 |
| 23 ObserverList<ViewTreeNodeObserver>* observers() { return &node_->observers_; } | 23 ObserverList<ViewTreeNodeObserver>* observers() { return &node_->observers_; } |
| 24 | 24 |
| 25 void ClearParent() { node_->parent_ = NULL; } | 25 void ClearParent() { node_->parent_ = NULL; } |
| 26 | 26 |
| 27 void set_id(TransportNodeId id) { node_->id_ = id; } |
| 28 |
| 29 void set_view_manager(ViewManager* manager) { |
| 30 node_->manager_ = manager; |
| 31 } |
| 32 |
| 33 void LocalAddChild(ViewTreeNode* child) { |
| 34 node_->LocalAddChild(child); |
| 35 } |
| 36 |
| 27 private: | 37 private: |
| 28 ViewTreeNode* node_; | 38 ViewTreeNode* node_; |
| 29 | 39 |
| 30 DISALLOW_COPY_AND_ASSIGN(ViewTreeNodePrivate); | 40 DISALLOW_COPY_AND_ASSIGN(ViewTreeNodePrivate); |
| 31 }; | 41 }; |
| 32 | 42 |
| 33 } // namespace view_manager | 43 } // namespace view_manager |
| 34 } // namespace services | 44 } // namespace services |
| 35 } // namespace mojo | 45 } // namespace mojo |
| 36 | 46 |
| 37 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_TREE_NODE_PRIVATE_H_ | 47 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_TREE_NODE_PRIVATE_H_ |
| OLD | NEW |