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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 template <typename T> | 95 template <typename T> |
96 void ClearLocalProperty(const ViewProperty<T>* property); | 96 void ClearLocalProperty(const ViewProperty<T>* property); |
97 | 97 |
98 // Type of a function to delete a property that this view owns. | 98 // Type of a function to delete a property that this view owns. |
99 typedef void (*PropertyDeallocator)(int64_t value); | 99 typedef void (*PropertyDeallocator)(int64_t value); |
100 | 100 |
101 // A View is drawn if the View and all its ancestors are visible and the | 101 // A View is drawn if the View and all its ancestors are visible and the |
102 // View is attached to the root. | 102 // View is attached to the root. |
103 bool IsDrawn() const; | 103 bool IsDrawn() const; |
104 | 104 |
| 105 // See mojom for details. |
| 106 void SetAccessPolicy(uint32_t policy_bitmask); |
| 107 |
105 // Observation. | 108 // Observation. |
106 void AddObserver(ViewObserver* observer); | 109 void AddObserver(ViewObserver* observer); |
107 void RemoveObserver(ViewObserver* observer); | 110 void RemoveObserver(ViewObserver* observer); |
108 | 111 |
109 // Tree. | 112 // Tree. |
110 View* parent() { return parent_; } | 113 View* parent() { return parent_; } |
111 const View* parent() const { return parent_; } | 114 const View* parent() const { return parent_; } |
112 const Children& children() const { return children_; } | 115 const Children& children() const { return children_; } |
113 View* GetRoot() { | 116 View* GetRoot() { |
114 return const_cast<View*>(const_cast<const View*>(this)->GetRoot()); | 117 return const_cast<View*>(const_cast<const View*>(this)->GetRoot()); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 }; | 214 }; |
212 | 215 |
213 std::map<const void*, Value> prop_map_; | 216 std::map<const void*, Value> prop_map_; |
214 | 217 |
215 MOJO_DISALLOW_COPY_AND_ASSIGN(View); | 218 MOJO_DISALLOW_COPY_AND_ASSIGN(View); |
216 }; | 219 }; |
217 | 220 |
218 } // namespace mojo | 221 } // namespace mojo |
219 | 222 |
220 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ | 223 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_H_ |
OLD | NEW |