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_NODE_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // Embedding. | 74 // Embedding. |
75 void Embed(const String& url); | 75 void Embed(const String& url); |
76 | 76 |
77 protected: | 77 protected: |
78 // This class is subclassed only by test classes that provide a public ctor. | 78 // This class is subclassed only by test classes that provide a public ctor. |
79 Node(); | 79 Node(); |
80 ~Node(); | 80 ~Node(); |
81 | 81 |
82 private: | 82 private: |
83 friend class NodePrivate; | 83 friend class NodePrivate; |
| 84 friend class ViewManagerClientImpl; |
84 | 85 |
85 explicit Node(ViewManager* manager); | 86 explicit Node(ViewManager* manager); |
86 | 87 |
87 void LocalDestroy(); | 88 void LocalDestroy(); |
88 void LocalAddChild(Node* child); | 89 void LocalAddChild(Node* child); |
89 void LocalRemoveChild(Node* child); | 90 void LocalRemoveChild(Node* child); |
90 // Returns true if the order actually changed. | 91 // Returns true if the order actually changed. |
91 bool LocalReorder(Node* relative, OrderDirection direction); | 92 bool LocalReorder(Node* relative, OrderDirection direction); |
92 void LocalSetActiveView(View* view); | 93 void LocalSetActiveView(View* view); |
93 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds); | 94 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds); |
94 | 95 |
95 ViewManager* manager_; | 96 ViewManager* manager_; |
96 Id id_; | 97 Id id_; |
97 Node* parent_; | 98 Node* parent_; |
98 Children children_; | 99 Children children_; |
99 | 100 |
100 ObserverList<NodeObserver> observers_; | 101 ObserverList<NodeObserver> observers_; |
101 | 102 |
102 gfx::Rect bounds_; | 103 gfx::Rect bounds_; |
103 View* active_view_; | 104 View* active_view_; |
104 | 105 |
105 DISALLOW_COPY_AND_ASSIGN(Node); | 106 DISALLOW_COPY_AND_ASSIGN(Node); |
106 }; | 107 }; |
107 | 108 |
108 } // namespace mojo | 109 } // namespace mojo |
109 | 110 |
110 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_ | 111 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_ |
OLD | NEW |