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

Unified Diff: components/mus/public/cpp/window_property.h

Issue 2029883002: Moves mash/wm into ash/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_static_assert
Patch Set: depend on test_wm Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/mus/public/cpp/window_property.h
diff --git a/components/mus/public/cpp/window_property.h b/components/mus/public/cpp/window_property.h
index 3299ac9db9885fec3d11198b057301f41387e190..a2bef90d9278d1b82aa209c0a837a689d912ef24 100644
--- a/components/mus/public/cpp/window_property.h
+++ b/components/mus/public/cpp/window_property.h
@@ -117,40 +117,40 @@ void Window::ClearLocalProperty(const WindowProperty<T>* property) {
// Macros to instantiate the property getter/setter template functions.
#define MUS_DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(EXPORT, T) \
- template EXPORT void mus::Window::SetLocalProperty( \
- const mus::WindowProperty<T>*, T); \
- template EXPORT T mus::Window::GetLocalProperty( \
- const mus::WindowProperty<T>*) const; \
- template EXPORT void mus::Window::ClearLocalProperty( \
- const mus::WindowProperty<T>*);
+ template EXPORT void ::mus::Window::SetLocalProperty( \
+ const ::mus::WindowProperty<T>*, T); \
+ template EXPORT T::mus::Window::GetLocalProperty( \
+ const ::mus::WindowProperty<T>*) const; \
+ template EXPORT void ::mus::Window::ClearLocalProperty( \
+ const ::mus::WindowProperty<T>*);
#define MUS_DECLARE_WINDOW_PROPERTY_TYPE(T) \
MUS_DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(, T)
-#define MUS_DEFINE_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
- static_assert(sizeof(TYPE) <= sizeof(int64_t), \
- "Property type must fit in 64 bits"); \
- namespace { \
- const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \
- } \
- const mus::WindowProperty<TYPE>* const NAME = &NAME##_Value;
-
-#define MUS_DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
- static_assert(sizeof(TYPE) <= sizeof(int64_t), \
- "Property type must fit in 64 bits"); \
- namespace { \
- const mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \
- const mus::WindowProperty<TYPE>* const NAME = &NAME##_Value; \
+#define MUS_DEFINE_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
+ static_assert(sizeof(TYPE) <= sizeof(int64_t), \
+ "Property type must fit in 64 bits"); \
+ namespace { \
+ const ::mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \
+ } \
+ const ::mus::WindowProperty<TYPE>* const NAME = &NAME##_Value;
+
+#define MUS_DEFINE_LOCAL_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
+ static_assert(sizeof(TYPE) <= sizeof(int64_t), \
+ "Property type must fit in 64 bits"); \
+ namespace { \
+ const ::mus::WindowProperty<TYPE> NAME##_Value = {DEFAULT, #NAME, nullptr}; \
+ const ::mus::WindowProperty<TYPE>* const NAME = &NAME##_Value; \
}
-#define MUS_DEFINE_OWNED_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
- namespace { \
- void Deallocator##NAME(int64_t p) { \
- enum { type_must_be_complete = sizeof(TYPE) }; \
- delete mus::WindowPropertyCaster<TYPE*>::FromInt64(p); \
- } \
- const mus::WindowProperty<TYPE*> NAME##_Value = {DEFAULT, #NAME, \
- &Deallocator##NAME}; \
- } \
- const mus::WindowProperty<TYPE*>* const NAME = &NAME##_Value;
+#define MUS_DEFINE_OWNED_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
+ namespace { \
+ void Deallocator##NAME(int64_t p) { \
+ enum { type_must_be_complete = sizeof(TYPE) }; \
+ delete ::mus::WindowPropertyCaster<TYPE*>::FromInt64(p); \
+ } \
+ const ::mus::WindowProperty<TYPE*> NAME##_Value = {DEFAULT, #NAME, \
+ &Deallocator##NAME}; \
+ } \
+ const ::mus::WindowProperty<TYPE*>* const NAME = &NAME##_Value;
#endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_PROPERTY_H_

Powered by Google App Engine
This is Rietveld 408576698