OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // | 51 // |
52 // int main() { | 52 // int main() { |
53 // rtc::scoped_refptr<Bar> bar = new rtc::RefCountedObject<Bar>(); | 53 // rtc::scoped_refptr<Bar> bar = new rtc::RefCountedObject<Bar>(); |
54 // auto functor = rtc::Bind(&Bar::Test, bar); | 54 // auto functor = rtc::Bind(&Bar::Test, bar); |
55 // bar = nullptr; | 55 // bar = nullptr; |
56 // // The functor stores an internal scoped_refptr<Bar>, so this is safe. | 56 // // The functor stores an internal scoped_refptr<Bar>, so this is safe. |
57 // functor(); | 57 // functor(); |
58 // } | 58 // } |
59 // | 59 // |
60 | 60 |
61 #ifndef WEBRTC_BASE_BIND_H_ | 61 #ifndef WEBRTC_RTC_BASE_BIND_H_ |
62 #define WEBRTC_BASE_BIND_H_ | 62 #define WEBRTC_RTC_BASE_BIND_H_ |
63 | 63 |
64 #include <tuple> | 64 #include <tuple> |
65 #include <type_traits> | 65 #include <type_traits> |
66 | 66 |
67 #include "webrtc/base/scoped_ref_ptr.h" | 67 #include "webrtc/base/scoped_ref_ptr.h" |
68 #include "webrtc/base/template_util.h" | 68 #include "webrtc/base/template_util.h" |
69 | 69 |
70 #define NONAME | 70 #define NONAME |
71 | 71 |
72 namespace rtc { | 72 namespace rtc { |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 typename detail::identity<Args>::type... args) { | 274 typename detail::identity<Args>::type... args) { |
275 return Functor<FP_T(NONAME), R, Args...>(function, args...); | 275 return Functor<FP_T(NONAME), R, Args...>(function, args...); |
276 } | 276 } |
277 | 277 |
278 #undef FP_T | 278 #undef FP_T |
279 | 279 |
280 } // namespace rtc | 280 } // namespace rtc |
281 | 281 |
282 #undef NONAME | 282 #undef NONAME |
283 | 283 |
284 #endif // WEBRTC_BASE_BIND_H_ | 284 #endif // WEBRTC_RTC_BASE_BIND_H_ |
OLD | NEW |