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

Side by Side Diff: components/mus/public/cpp/window_property.h

Issue 1899323002: Add mash shelf application id support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 8 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_MUS_PUBLIC_CPP_WINDOW_PROPERTY_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_PROPERTY_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_PROPERTY_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_PROPERTY_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 // This header should be included by code that defines WindowProperties. It
11 // should not be included by code that only gets and sets WindowProperties.
12 //
13 // To define a new WindowProperty: 10 // To define a new WindowProperty:
14 // 11 //
15 // #include "components/mus/public/cpp/window_property.h" 12 // #include "components/mus/public/cpp/window_property.h"
16 // 13 //
17 // MUS_DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(FOO_EXPORT, MyType); 14 // MUS_DECLARE_EXPORTED_WINDOW_PROPERTY_TYPE(FOO_EXPORT, MyType);
18 // namespace foo { 15 // namespace foo {
19 // // Use this to define an exported property that is primitive, 16 // // Use this to define an exported property that is primitive,
20 // // or a pointer you don't want automatically deleted. 17 // // or a pointer you don't want automatically deleted.
21 // MUS_DEFINE_WINDOW_PROPERTY_KEY(MyType, kMyKey, MyDefault); 18 // MUS_DEFINE_WINDOW_PROPERTY_KEY(MyType, kMyKey, MyDefault);
22 // 19 //
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 void Deallocator##NAME(int64_t p) { \ 147 void Deallocator##NAME(int64_t p) { \
151 enum { type_must_be_complete = sizeof(TYPE) }; \ 148 enum { type_must_be_complete = sizeof(TYPE) }; \
152 delete mus::WindowPropertyCaster<TYPE*>::FromInt64(p); \ 149 delete mus::WindowPropertyCaster<TYPE*>::FromInt64(p); \
153 } \ 150 } \
154 const mus::WindowProperty<TYPE*> NAME##_Value = {DEFAULT, #NAME, \ 151 const mus::WindowProperty<TYPE*> NAME##_Value = {DEFAULT, #NAME, \
155 &Deallocator##NAME}; \ 152 &Deallocator##NAME}; \
156 } \ 153 } \
157 const mus::WindowProperty<TYPE*>* const NAME = &NAME##_Value; 154 const mus::WindowProperty<TYPE*>* const NAME = &NAME##_Value;
158 155
159 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_PROPERTY_H_ 156 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_PROPERTY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698