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_VIEW_TREE_NODE_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "mojo/public/cpp/bindings/array.h" |
12 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" | 13 #include "mojo/services/public/cpp/view_manager/view_manager_types.h" |
13 #include "ui/gfx/geometry/rect.h" | 14 #include "ui/gfx/geometry/rect.h" |
14 | 15 |
15 namespace mojo { | 16 namespace mojo { |
16 namespace view_manager { | 17 namespace view_manager { |
17 | 18 |
18 class View; | 19 class View; |
19 class ViewManager; | 20 class ViewManager; |
20 class ViewTreeNodeObserver; | 21 class ViewTreeNodeObserver; |
21 | 22 |
(...skipping 30 matching lines...) Expand all Loading... |
52 void RemoveChild(ViewTreeNode* child); | 53 void RemoveChild(ViewTreeNode* child); |
53 | 54 |
54 bool Contains(ViewTreeNode* child) const; | 55 bool Contains(ViewTreeNode* child) const; |
55 | 56 |
56 ViewTreeNode* GetChildById(TransportNodeId id); | 57 ViewTreeNode* GetChildById(TransportNodeId id); |
57 | 58 |
58 // View. | 59 // View. |
59 void SetActiveView(View* view); | 60 void SetActiveView(View* view); |
60 View* active_view() { return active_view_; } | 61 View* active_view() { return active_view_; } |
61 | 62 |
| 63 // Embedding. |
| 64 void Embed(const String& url); |
| 65 |
62 protected: | 66 protected: |
63 // This class is subclassed only by test classes that provide a public ctor. | 67 // This class is subclassed only by test classes that provide a public ctor. |
64 ViewTreeNode(); | 68 ViewTreeNode(); |
65 ~ViewTreeNode(); | 69 ~ViewTreeNode(); |
66 | 70 |
67 private: | 71 private: |
68 friend class ViewTreeNodePrivate; | 72 friend class ViewTreeNodePrivate; |
69 | 73 |
70 explicit ViewTreeNode(ViewManager* manager); | 74 explicit ViewTreeNode(ViewManager* manager); |
71 | 75 |
(...skipping 13 matching lines...) Expand all Loading... |
85 gfx::Rect bounds_; | 89 gfx::Rect bounds_; |
86 View* active_view_; | 90 View* active_view_; |
87 | 91 |
88 DISALLOW_COPY_AND_ASSIGN(ViewTreeNode); | 92 DISALLOW_COPY_AND_ASSIGN(ViewTreeNode); |
89 }; | 93 }; |
90 | 94 |
91 } // namespace view_manager | 95 } // namespace view_manager |
92 } // namespace mojo | 96 } // namespace mojo |
93 | 97 |
94 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_H_ | 98 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_TREE_NODE_H_ |
OLD | NEW |