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

Side by Side Diff: ui/aura/window_property.h

Issue 10533063: Use unique name for property deallocator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_AURA_WINDOW_PROPERTY_H_ 5 #ifndef UI_AURA_WINDOW_PROPERTY_H_
6 #define UI_AURA_WINDOW_PROPERTY_H_ 6 #define UI_AURA_WINDOW_PROPERTY_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/aura/aura_export.h" 9 #include "ui/aura/aura_export.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } \ 122 } \
123 const aura::WindowProperty<TYPE>* const NAME = & NAME ## _Value; 123 const aura::WindowProperty<TYPE>* const NAME = & NAME ## _Value;
124 124
125 #define DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ 125 #define DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
126 namespace { \ 126 namespace { \
127 const aura::WindowProperty<TYPE> NAME ## _Value = {DEFAULT, #NAME, NULL}; \ 127 const aura::WindowProperty<TYPE> NAME ## _Value = {DEFAULT, #NAME, NULL}; \
128 const aura::WindowProperty<TYPE>* const NAME = & NAME ## _Value; \ 128 const aura::WindowProperty<TYPE>* const NAME = & NAME ## _Value; \
129 } 129 }
130 130
131 #define DEFINE_OWNED_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \ 131 #define DEFINE_OWNED_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
132 namespace { \ 132 namespace { \
133 enum { type_must_be_complete = sizeof(TYPE) }; \ 133 void Deallocator ## NAME (intptr_t p) { \
134 void Deallocator(intptr_t p) { \ 134 enum { type_must_be_complete = sizeof(TYPE) }; \
135 delete aura::WindowPropertyCaster<TYPE*>::FromIntptrT(p); \ 135 delete aura::WindowPropertyCaster<TYPE*>::FromIntptrT(p); \
136 } \ 136 } \
137 const aura::WindowProperty<TYPE*> NAME ## _Value = \ 137 const aura::WindowProperty<TYPE*> NAME ## _Value = \
138 {DEFAULT,#NAME,&Deallocator}; \ 138 {DEFAULT,#NAME,&Deallocator ## NAME}; \
139 } \ 139 } \
140 const aura::WindowProperty<TYPE*>* const NAME = & NAME ## _Value; 140 const aura::WindowProperty<TYPE*>* const NAME = & NAME ## _Value;
141 141
142 #endif // UI_AURA_WINDOW_PROPERTY_H_ 142 #endif // UI_AURA_WINDOW_PROPERTY_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698