Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_BIND_H_ | 5 #ifndef BASE_BIND_H_ |
| 6 #define BASE_BIND_H_ | 6 #define BASE_BIND_H_ |
| 7 | 7 |
| 8 #include "base/bind_internal.h" | 8 #include "base/bind_internal.h" |
| 9 | 9 |
| 10 // ----------------------------------------------------------------------------- | 10 // ----------------------------------------------------------------------------- |
| 11 // Usage documentation | 11 // Usage documentation |
| 12 // ----------------------------------------------------------------------------- | 12 // ----------------------------------------------------------------------------- |
| 13 // | 13 // |
| 14 // See //docs/callback.md for documentation. | 14 // See //docs/callback.md for documentation. |
| 15 // | 15 // It's not necessary to include base/bind_helpers.h in your implementation. |
|
dcheng
2016/10/18 19:30:56
Nit: "your implementation" feels a little vague he
robliao
2016/10/18 19:35:17
Updated to "your file".
| |
| 16 // Those functions are assumed to be part of this library. | |
| 16 // | 17 // |
| 17 // ----------------------------------------------------------------------------- | 18 // ----------------------------------------------------------------------------- |
| 18 // Implementation notes | 19 // Implementation notes |
| 19 // ----------------------------------------------------------------------------- | 20 // ----------------------------------------------------------------------------- |
| 20 // | 21 // |
| 21 // If you're reading the implementation, before proceeding further, you should | 22 // If you're reading the implementation, before proceeding further, you should |
| 22 // read the top comment of base/bind_internal.h for a definition of common | 23 // read the top comment of base/bind_internal.h for a definition of common |
| 23 // terms and concepts. | 24 // terms and concepts. |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 template <typename Functor, typename... Args> | 75 template <typename Functor, typename... Args> |
| 75 inline Callback<MakeUnboundRunType<Functor, Args...>> | 76 inline Callback<MakeUnboundRunType<Functor, Args...>> |
| 76 Bind(Functor&& functor, Args&&... args) { | 77 Bind(Functor&& functor, Args&&... args) { |
| 77 return BindRepeating(std::forward<Functor>(functor), | 78 return BindRepeating(std::forward<Functor>(functor), |
| 78 std::forward<Args>(args)...); | 79 std::forward<Args>(args)...); |
| 79 } | 80 } |
| 80 | 81 |
| 81 } // namespace base | 82 } // namespace base |
| 82 | 83 |
| 83 #endif // BASE_BIND_H_ | 84 #endif // BASE_BIND_H_ |
| OLD | NEW |