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

Side by Side Diff: ui/base/class_property.h

Issue 2735983006: Renames WmWindowUserData and converts to using aura (Closed)
Patch Set: ownership comments Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 UI_BASE_CLASS_PROPERTY_H_ 5 #ifndef UI_BASE_CLASS_PROPERTY_H_
6 #define UI_BASE_CLASS_PROPERTY_H_ 6 #define UI_BASE_CLASS_PROPERTY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 12 matching lines...) Expand all
23 // #include "ui/base/class_property.h" 23 // #include "ui/base/class_property.h"
24 // 24 //
25 // DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(FOO_EXPORT, MyType); 25 // DECLARE_EXPORTED_UI_CLASS_PROPERTY_TYPE(FOO_EXPORT, MyType);
26 // namespace foo { 26 // namespace foo {
27 // // Use this to define an exported property that is primitive, 27 // // Use this to define an exported property that is primitive,
28 // // or a pointer you don't want automatically deleted. 28 // // or a pointer you don't want automatically deleted.
29 // DEFINE_UI_CLASS_PROPERTY_KEY(MyType, kMyKey, MyDefault); 29 // DEFINE_UI_CLASS_PROPERTY_KEY(MyType, kMyKey, MyDefault);
30 // 30 //
31 // // Use this to define an exported property whose value is a heap 31 // // Use this to define an exported property whose value is a heap
32 // // allocated object, and has to be owned and freed by the class. 32 // // allocated object, and has to be owned and freed by the class.
33 // DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Rect, kRestoreBoundsKey, NULL); 33 // DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(gfx::Rect, kRestoreBoundsKey, nullptr);
34 // 34 //
35 // // Use this to define a non exported property that is primitive, 35 // // Use this to define a non exported property that is primitive,
36 // // or a pointer you don't want to automatically deleted, and is used 36 // // or a pointer you don't want to automatically deleted, and is used
37 // // only in a specific file. This will define the property in an unnamed 37 // // only in a specific file. This will define the property in an unnamed
38 // // namespace which cannot be accessed from another file. 38 // // namespace which cannot be accessed from another file.
39 // DEFINE_LOCAL_UI_CLASS_PROPERTY_KEY(MyType, kMyKey, MyDefault); 39 // DEFINE_LOCAL_UI_CLASS_PROPERTY_KEY(MyType, kMyKey, MyDefault);
40 // 40 //
41 // } // foo namespace 41 // } // foo namespace
42 // 42 //
43 // To define a new type used for ClassProperty. 43 // To define a new type used for ClassProperty.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 void Deallocator##NAME(int64_t p) { \ 223 void Deallocator##NAME(int64_t p) { \
224 enum { type_must_be_complete = sizeof(TYPE) }; \ 224 enum { type_must_be_complete = sizeof(TYPE) }; \
225 delete ::ui::ClassPropertyCaster<TYPE*>::FromInt64(p); \ 225 delete ::ui::ClassPropertyCaster<TYPE*>::FromInt64(p); \
226 } \ 226 } \
227 const ::ui::ClassProperty<TYPE*> NAME##_Value = {DEFAULT, #NAME, \ 227 const ::ui::ClassProperty<TYPE*> NAME##_Value = {DEFAULT, #NAME, \
228 &Deallocator##NAME}; \ 228 &Deallocator##NAME}; \
229 } \ 229 } \
230 const ::ui::ClassProperty<TYPE*>* const NAME = &NAME##_Value; 230 const ::ui::ClassProperty<TYPE*>* const NAME = &NAME##_Value;
231 231
232 #endif // UI_BASE_CLASS_PROPERTY_H_ 232 #endif // UI_BASE_CLASS_PROPERTY_H_
OLDNEW
« ash/common/wm/window_dimmer.h ('K') | « ash/wm/system_modal_container_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698