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