Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: components/view_manager/public/cpp/view.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/view_manager/public/cpp/lib/view_private.h ('k') | components/view_manager/server_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698