OLD | NEW |
1 // This file was GENERATED by command: | 1 // This file was GENERATED by command: |
2 // pump.py callback.h.pump | 2 // pump.py callback.h.pump |
3 // DO NOT EDIT BY HAND!!! | 3 // DO NOT EDIT BY HAND!!! |
4 | 4 |
5 | 5 |
6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 6 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
7 // Use of this source code is governed by a BSD-style license that can be | 7 // Use of this source code is governed by a BSD-style license that can be |
8 // found in the LICENSE file. | 8 // found in the LICENSE file. |
9 | 9 |
10 #ifndef BASE_CALLBACK_H_ | 10 #ifndef BASE_CALLBACK_H_ |
11 #define BASE_CALLBACK_H_ | 11 #define BASE_CALLBACK_H_ |
12 #pragma once | 12 #pragma once |
13 | 13 |
14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
15 #include "base/callback_internal.h" | 15 #include "base/callback_internal.h" |
16 #include "base/template_util.h" | 16 #include "base/template_util.h" |
17 | 17 |
18 // NOTE: Header files that do not require the full definition of Callback or | 18 // NOTE: Header files that do not require the full definition of Callback or |
19 // Closure should #include "base/callback_forward.h" instead of this file. | 19 // Closure should #include "base/callback_forward.h" instead of this file. |
20 | 20 |
21 // New, super-duper, unified Callback system. This will eventually replace | 21 // New, super-duper, unified Callback system. This will eventually replace |
22 // NewRunnableMethod, NewRunnableFunction, CreateFunctor, and CreateCallback | 22 // NewRunnableMethod, CreateFunctor, and CreateCallback systems currently in the |
23 // systems currently in the Chromium code base. | 23 // Chromium code base. |
24 // | 24 // |
25 // WHAT IS THIS: | 25 // WHAT IS THIS: |
26 // | 26 // |
27 // The templated Callback class is a generalized function object. Together | 27 // The templated Callback class is a generalized function object. Together |
28 // with the Bind() function in bind.h, they provide a type-safe method for | 28 // with the Bind() function in bind.h, they provide a type-safe method for |
29 // performing currying of arguments, and creating a "closure." | 29 // performing currying of arguments, and creating a "closure." |
30 // | 30 // |
31 // In programming languages, a closure is a first-class function where all its | 31 // In programming languages, a closure is a first-class function where all its |
32 // parameters have been bound (usually via currying). Closures are well | 32 // parameters have been bound (usually via currying). Closures are well |
33 // suited for representing, and passing around a unit of delayed execution. | 33 // suited for representing, and passing around a unit of delayed execution. |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 }; | 629 }; |
630 | 630 |
631 | 631 |
632 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it | 632 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it |
633 // will be used in a lot of APIs with delayed execution. | 633 // will be used in a lot of APIs with delayed execution. |
634 typedef Callback<void(void)> Closure; | 634 typedef Callback<void(void)> Closure; |
635 | 635 |
636 } // namespace base | 636 } // namespace base |
637 | 637 |
638 #endif // BASE_CALLBACK_H | 638 #endif // BASE_CALLBACK_H |
OLD | NEW |