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" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "mojo/public/cpp/bindings/array.h" | 12 #include "mojo/public/cpp/bindings/array.h" |
13 #include "mojo/services/public/cpp/view_manager/types.h" | 13 #include "mojo/services/public/cpp/view_manager/types.h" |
14 #include "mojo/services/public/interfaces/view_manager/view_manager_constants.mo
jom.h" | 14 #include "mojo/services/public/interfaces/view_manager/view_manager_constants.mo
jom.h" |
15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 namespace view_manager { | |
19 | 18 |
20 class View; | 19 class View; |
21 class ViewManager; | 20 class ViewManager; |
22 class NodeObserver; | 21 class NodeObserver; |
23 | 22 |
24 // Nodes are owned by the ViewManager. | 23 // Nodes are owned by the ViewManager. |
25 // TODO(beng): Right now, you'll have to implement a NodeObserver to track | 24 // TODO(beng): Right now, you'll have to implement a NodeObserver to track |
26 // destruction and NULL any pointers you have. | 25 // destruction and NULL any pointers you have. |
27 // Investigate some kind of smart pointer or weak pointer for these. | 26 // Investigate some kind of smart pointer or weak pointer for these. |
28 class Node { | 27 class Node { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 Children children_; | 98 Children children_; |
100 | 99 |
101 ObserverList<NodeObserver> observers_; | 100 ObserverList<NodeObserver> observers_; |
102 | 101 |
103 gfx::Rect bounds_; | 102 gfx::Rect bounds_; |
104 View* active_view_; | 103 View* active_view_; |
105 | 104 |
106 DISALLOW_COPY_AND_ASSIGN(Node); | 105 DISALLOW_COPY_AND_ASSIGN(Node); |
107 }; | 106 }; |
108 | 107 |
109 } // namespace view_manager | |
110 } // namespace mojo | 108 } // namespace mojo |
111 | 109 |
112 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_ | 110 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_NODE_H_ |
OLD | NEW |