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

Side by Side Diff: third_party/WebKit/Source/platform/CrossThreadCopier.h

Issue 2091713002: Specialize base::IsWeakReceiver for Blink weak pointers to support base::Bind (1/5) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +#include for build fix Created 4 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
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 STATIC_ONLY(CrossThreadCopier); 164 STATIC_ONLY(CrossThreadCopier);
165 }; 165 };
166 166
167 template <typename T> 167 template <typename T>
168 struct CrossThreadCopier<WTF::PassedWrapper<T>> { 168 struct CrossThreadCopier<WTF::PassedWrapper<T>> {
169 STATIC_ONLY(CrossThreadCopier); 169 STATIC_ONLY(CrossThreadCopier);
170 using Type = WTF::PassedWrapper<typename CrossThreadCopier<T>::Type>; 170 using Type = WTF::PassedWrapper<typename CrossThreadCopier<T>::Type>;
171 static Type copy(WTF::PassedWrapper<T>&& value) { return passed(CrossThreadC opier<T>::copy(value.moveOut())); } 171 static Type copy(WTF::PassedWrapper<T>&& value) { return passed(CrossThreadC opier<T>::copy(value.moveOut())); }
172 }; 172 };
173 173
174 template<typename T>
175 struct CrossThreadCopier<CrossThreadWeakPersistentThisPointer<T>> : public Cross ThreadCopierPassThrough<CrossThreadWeakPersistentThisPointer<T>> {
176 STATIC_ONLY(CrossThreadCopier);
177 };
178
179 template <> 174 template <>
180 struct CrossThreadCopier<KURL> { 175 struct CrossThreadCopier<KURL> {
181 STATIC_ONLY(CrossThreadCopier); 176 STATIC_ONLY(CrossThreadCopier);
182 typedef KURL Type; 177 typedef KURL Type;
183 PLATFORM_EXPORT static Type copy(const KURL&); 178 PLATFORM_EXPORT static Type copy(const KURL&);
184 }; 179 };
185 180
186 template <> 181 template <>
187 struct CrossThreadCopier<String> { 182 struct CrossThreadCopier<String> {
188 STATIC_ONLY(CrossThreadCopier); 183 STATIC_ONLY(CrossThreadCopier);
(...skipping 29 matching lines...) Expand all
218 typedef T* Type; 213 typedef T* Type;
219 static Type copy(const Member<T>& ptr) 214 static Type copy(const Member<T>& ptr)
220 { 215 {
221 return ptr; 216 return ptr;
222 } 217 }
223 }; 218 };
224 219
225 } // namespace blink 220 } // namespace blink
226 221
227 #endif // CrossThreadCopier_h 222 #endif // CrossThreadCopier_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webusb/USBDevice.cpp ('k') | third_party/WebKit/Source/platform/heap/Member.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698