| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 #include "base/bind.h" | 29 #include "base/bind.h" |
| 30 #include "base/threading/thread_checker.h" | 30 #include "base/threading/thread_checker.h" |
| 31 #include "wtf/Allocator.h" | 31 #include "wtf/Allocator.h" |
| 32 #include "wtf/Assertions.h" | 32 #include "wtf/Assertions.h" |
| 33 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
| 34 #include "wtf/PtrUtil.h" | 34 #include "wtf/PtrUtil.h" |
| 35 #include "wtf/RefPtr.h" | 35 #include "wtf/RefPtr.h" |
| 36 #include "wtf/ThreadSafeRefCounted.h" | 36 #include "wtf/ThreadSafeRefCounted.h" |
| 37 #include "wtf/TypeTraits.h" | 37 #include "wtf/TypeTraits.h" |
| 38 #include "wtf/WeakPtr.h" |
| 38 #include <utility> | 39 #include <utility> |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 template <typename T> class Member; | 42 template <typename T> class Member; |
| 42 template <typename T> class WeakMember; | 43 template <typename T> class WeakMember; |
| 43 } | 44 } |
| 44 | 45 |
| 45 namespace WTF { | 46 namespace WTF { |
| 46 | 47 |
| 47 // Functional.h provides a very simple way to bind a function pointer and argume
nts together into a function object | 48 // Functional.h provides a very simple way to bind a function pointer and argume
nts together into a function object |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } | 232 } |
| 232 | 233 |
| 233 typedef Function<void(), SameThreadAffinity> Closure; | 234 typedef Function<void(), SameThreadAffinity> Closure; |
| 234 typedef Function<void(), CrossThreadAffinity> CrossThreadClosure; | 235 typedef Function<void(), CrossThreadAffinity> CrossThreadClosure; |
| 235 | 236 |
| 236 } // namespace WTF | 237 } // namespace WTF |
| 237 | 238 |
| 238 namespace base { | 239 namespace base { |
| 239 | 240 |
| 240 template <typename T> | 241 template <typename T> |
| 242 struct IsWeakReceiver<WTF::WeakPtr<T>> : std::true_type {}; |
| 243 |
| 244 template <typename T> |
| 241 struct BindUnwrapTraits<WTF::RefPtr<T>> { | 245 struct BindUnwrapTraits<WTF::RefPtr<T>> { |
| 242 static T* Unwrap(const WTF::RefPtr<T>& wrapped) | 246 static T* Unwrap(const WTF::RefPtr<T>& wrapped) |
| 243 { | 247 { |
| 244 return wrapped.get(); | 248 return wrapped.get(); |
| 245 } | 249 } |
| 246 }; | 250 }; |
| 247 | 251 |
| 248 template <typename T> | 252 template <typename T> |
| 249 struct BindUnwrapTraits<WTF::PassedWrapper<T>> { | 253 struct BindUnwrapTraits<WTF::PassedWrapper<T>> { |
| 250 static T Unwrap(const WTF::PassedWrapper<T>& wrapped) | 254 static T Unwrap(const WTF::PassedWrapper<T>& wrapped) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 264 } // namespace base | 268 } // namespace base |
| 265 | 269 |
| 266 using WTF::passed; | 270 using WTF::passed; |
| 267 using WTF::unretained; | 271 using WTF::unretained; |
| 268 using WTF::crossThreadUnretained; | 272 using WTF::crossThreadUnretained; |
| 269 | 273 |
| 270 using WTF::Function; | 274 using WTF::Function; |
| 271 using WTF::CrossThreadClosure; | 275 using WTF::CrossThreadClosure; |
| 272 | 276 |
| 273 #endif // WTF_Functional_h | 277 #endif // WTF_Functional_h |
| OLD | NEW |