| 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 COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ |
| 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ | 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 180 |
| 181 // Returns true if embed is allowed for this node. If embedding is allowed all | 181 // Returns true if embed is allowed for this node. If embedding is allowed all |
| 182 // the children are removed. | 182 // the children are removed. |
| 183 bool PrepareForEmbed(); | 183 bool PrepareForEmbed(); |
| 184 | 184 |
| 185 ViewManager* manager_; | 185 ViewManager* manager_; |
| 186 Id id_; | 186 Id id_; |
| 187 View* parent_; | 187 View* parent_; |
| 188 Children children_; | 188 Children children_; |
| 189 | 189 |
| 190 ObserverList<ViewObserver> observers_; | 190 base::ObserverList<ViewObserver> observers_; |
| 191 | 191 |
| 192 Rect bounds_; | 192 Rect bounds_; |
| 193 ViewportMetricsPtr viewport_metrics_; | 193 ViewportMetricsPtr viewport_metrics_; |
| 194 | 194 |
| 195 bool visible_; | 195 bool visible_; |
| 196 | 196 |
| 197 SharedProperties properties_; | 197 SharedProperties properties_; |
| 198 | 198 |
| 199 // Drawn state is derived from the visible state and the parent's visible | 199 // Drawn state is derived from the visible state and the parent's visible |
| 200 // state. This field is only used if the view has no parent (eg it's a root). | 200 // state. This field is only used if the view has no parent (eg it's a root). |
| 201 bool drawn_; | 201 bool drawn_; |
| 202 | 202 |
| 203 // Value struct to keep the name and deallocator for this property. | 203 // Value struct to keep the name and deallocator for this property. |
| 204 // Key cannot be used for this purpose because it can be char* or | 204 // Key cannot be used for this purpose because it can be char* or |
| 205 // WindowProperty<>. | 205 // WindowProperty<>. |
| 206 struct Value { | 206 struct Value { |
| 207 const char* name; | 207 const char* name; |
| 208 int64_t value; | 208 int64_t value; |
| 209 PropertyDeallocator deallocator; | 209 PropertyDeallocator deallocator; |
| 210 }; | 210 }; |
| 211 | 211 |
| 212 std::map<const void*, Value> prop_map_; | 212 std::map<const void*, Value> prop_map_; |
| 213 | 213 |
| 214 MOJO_DISALLOW_COPY_AND_ASSIGN(View); | 214 MOJO_DISALLOW_COPY_AND_ASSIGN(View); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace mojo | 217 } // namespace mojo |
| 218 | 218 |
| 219 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ | 219 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ |
| OLD | NEW |