OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 #include "wtf/TypeTraits.h" | 43 #include "wtf/TypeTraits.h" |
44 | 44 |
45 namespace blink { | 45 namespace blink { |
46 | 46 |
47 class IntRect; | 47 class IntRect; |
48 class IntSize; | 48 class IntSize; |
49 class KURL; | 49 class KURL; |
50 class ResourceError; | 50 class ResourceError; |
51 class ResourceRequest; | 51 class ResourceRequest; |
52 class ResourceResponse; | 52 class ResourceResponse; |
53 class ResourceTimingInfo; | |
53 struct CrossThreadResourceResponseData; | 54 struct CrossThreadResourceResponseData; |
54 struct CrossThreadResourceRequestData; | 55 struct CrossThreadResourceRequestData; |
56 struct CrossThreadResourceTimingInfoData; | |
55 | 57 |
56 template<typename T> struct CrossThreadCopierPassThrough { | 58 template<typename T> struct CrossThreadCopierPassThrough { |
57 typedef T Type; | 59 typedef T Type; |
58 static Type copy(const T& parameter) | 60 static Type copy(const T& parameter) |
59 { | 61 { |
60 return parameter; | 62 return parameter; |
61 } | 63 } |
62 }; | 64 }; |
63 | 65 |
64 template<bool isConvertibleToInteger, bool isThreadSafeRefCounted, bool isGa rbageCollected, typename T> struct CrossThreadCopierBase; | 66 template<bool isConvertibleToInteger, bool isThreadSafeRefCounted, bool isGa rbageCollected, typename T> struct CrossThreadCopierBase; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 template<> struct CrossThreadCopierBase<false, false, false, ResourceRequest > { | 130 template<> struct CrossThreadCopierBase<false, false, false, ResourceRequest > { |
129 typedef PassOwnPtr<CrossThreadResourceRequestData> Type; | 131 typedef PassOwnPtr<CrossThreadResourceRequestData> Type; |
130 PLATFORM_EXPORT static Type copy(const ResourceRequest&); | 132 PLATFORM_EXPORT static Type copy(const ResourceRequest&); |
131 }; | 133 }; |
132 | 134 |
133 template<> struct CrossThreadCopierBase<false, false, false, ResourceRespons e> { | 135 template<> struct CrossThreadCopierBase<false, false, false, ResourceRespons e> { |
134 typedef PassOwnPtr<CrossThreadResourceResponseData> Type; | 136 typedef PassOwnPtr<CrossThreadResourceResponseData> Type; |
135 PLATFORM_EXPORT static Type copy(const ResourceResponse&); | 137 PLATFORM_EXPORT static Type copy(const ResourceResponse&); |
136 }; | 138 }; |
137 | 139 |
140 template<> struct CrossThreadCopierBase<false, false, false, ResourceTimingI nfo> { | |
tkent
2015/06/24 02:03:58
Please move this to ResourceTimingInfo.h.
Kunihiko Sakamoto
2015/06/24 02:47:50
Done.
(Moved definition of copy() to ResourceTimin
Kunihiko Sakamoto
2015/06/24 02:58:29
...and made it inline.
| |
141 typedef PassOwnPtr<CrossThreadResourceTimingInfoData> Type; | |
142 PLATFORM_EXPORT static Type copy(const ResourceTimingInfo&); | |
143 }; | |
144 | |
138 template<typename T> struct CrossThreadCopierBase<false, false, true, T> { | 145 template<typename T> struct CrossThreadCopierBase<false, false, true, T> { |
139 typedef typename WTF::RemovePointer<T>::Type TypeWithoutPointer; | 146 typedef typename WTF::RemovePointer<T>::Type TypeWithoutPointer; |
140 typedef RawPtr<TypeWithoutPointer> Type; | 147 typedef RawPtr<TypeWithoutPointer> Type; |
141 static Type copy(const T& ptr) | 148 static Type copy(const T& ptr) |
142 { | 149 { |
143 return ptr; | 150 return ptr; |
144 } | 151 } |
145 }; | 152 }; |
146 | 153 |
147 template<typename T> struct CrossThreadCopierBase<false, false, true, RawPtr <T>> { | 154 template<typename T> struct CrossThreadCopierBase<false, false, true, RawPtr <T>> { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 | 240 |
234 template<typename T> AllowAccessLaterWrapper<T> AllowAccessLater(T* value) | 241 template<typename T> AllowAccessLaterWrapper<T> AllowAccessLater(T* value) |
235 { | 242 { |
236 return AllowAccessLaterWrapper<T>(value); | 243 return AllowAccessLaterWrapper<T>(value); |
237 } | 244 } |
238 | 245 |
239 | 246 |
240 } // namespace blink | 247 } // namespace blink |
241 | 248 |
242 #endif // CrossThreadCopier_h | 249 #endif // CrossThreadCopier_h |
OLD | NEW |