| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 PLATFORM_EXPORT static Type copy(const ResourceRequest&); | 199 PLATFORM_EXPORT static Type copy(const ResourceRequest&); |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 template <> | 202 template <> |
| 203 struct CrossThreadCopier<ResourceResponse> { | 203 struct CrossThreadCopier<ResourceResponse> { |
| 204 STATIC_ONLY(CrossThreadCopier); | 204 STATIC_ONLY(CrossThreadCopier); |
| 205 typedef WTF::PassedWrapper<std::unique_ptr<CrossThreadResourceResponseData>>
Type; | 205 typedef WTF::PassedWrapper<std::unique_ptr<CrossThreadResourceResponseData>>
Type; |
| 206 PLATFORM_EXPORT static Type copy(const ResourceResponse&); | 206 PLATFORM_EXPORT static Type copy(const ResourceResponse&); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 template <typename T> | |
| 210 struct CrossThreadCopier<Member<T>> { | |
| 211 STATIC_ONLY(CrossThreadCopier); | |
| 212 static_assert(IsGarbageCollectedType<T>::value, "T must be a garbage-collect
ed type."); | |
| 213 typedef T* Type; | |
| 214 static Type copy(const Member<T>& ptr) | |
| 215 { | |
| 216 return ptr; | |
| 217 } | |
| 218 }; | |
| 219 | |
| 220 } // namespace blink | 209 } // namespace blink |
| 221 | 210 |
| 222 #endif // CrossThreadCopier_h | 211 #endif // CrossThreadCopier_h |
| OLD | NEW |