| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 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_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 | |
| 10 #include "mojo/services/public/cpp/view_manager/view_tree_node.h" | |
| 11 | |
| 12 namespace mojo { | |
| 13 namespace view_manager { | |
| 14 | |
| 15 class ViewTreeNodePrivate { | |
| 16 public: | |
| 17 explicit ViewTreeNodePrivate(ViewTreeNode* node); | |
| 18 ~ViewTreeNodePrivate(); | |
| 19 | |
| 20 static ViewTreeNode* LocalCreate(); | |
| 21 | |
| 22 ObserverList<ViewTreeNodeObserver>* observers() { return &node_->observers_; } | |
| 23 | |
| 24 void ClearParent() { node_->parent_ = NULL; } | |
| 25 | |
| 26 void set_id(Id id) { node_->id_ = id; } | |
| 27 | |
| 28 ViewManager* view_manager() { return node_->manager_; } | |
| 29 void set_view_manager(ViewManager* manager) { | |
| 30 node_->manager_ = manager; | |
| 31 } | |
| 32 | |
| 33 void LocalDestroy() { | |
| 34 node_->LocalDestroy(); | |
| 35 } | |
| 36 void LocalAddChild(ViewTreeNode* child) { | |
| 37 node_->LocalAddChild(child); | |
| 38 } | |
| 39 void LocalRemoveChild(ViewTreeNode* child) { | |
| 40 node_->LocalRemoveChild(child); | |
| 41 } | |
| 42 void LocalReorder(ViewTreeNode* relative, OrderDirection direction) { | |
| 43 node_->LocalReorder(relative, direction); | |
| 44 } | |
| 45 void LocalSetActiveView(View* view) { | |
| 46 node_->LocalSetActiveView(view); | |
| 47 } | |
| 48 void LocalSetBounds(const gfx::Rect& old_bounds, | |
| 49 const gfx::Rect& new_bounds) { | |
| 50 node_->LocalSetBounds(old_bounds, new_bounds); | |
| 51 } | |
| 52 | |
| 53 private: | |
| 54 ViewTreeNode* node_; | |
| 55 | |
| 56 DISALLOW_COPY_AND_ASSIGN(ViewTreeNodePrivate); | |
| 57 }; | |
| 58 | |
| 59 } // namespace view_manager | |
| 60 } // namespace mojo | |
| 61 | |
| 62 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_LIB_VIEW_TREE_NODE_PRIVATE_H_ | |
| OLD | NEW |