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