| 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 | |
| 22 // NewRunnableMethod, CreateFunctor, and CreateCallback systems currently in the | |
| 23 // Chromium code base. | |
| 24 // | |
| 25 // WHAT IS THIS: | 21 // WHAT IS THIS: |
| 26 // | 22 // |
| 27 // The templated Callback class is a generalized function object. Together | 23 // 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 | 24 // with the Bind() function in bind.h, they provide a type-safe method for |
| 29 // performing currying of arguments, and creating a "closure." | 25 // performing currying of arguments, and creating a "closure." |
| 30 // | 26 // |
| 31 // In programming languages, a closure is a first-class function where all its | 27 // In programming languages, a closure is a first-class function where all its |
| 32 // parameters have been bound (usually via currying). Closures are well | 28 // parameters have been bound (usually via currying). Closures are well |
| 33 // suited for representing, and passing around a unit of delayed execution. | 29 // suited for representing, and passing around a unit of delayed execution. |
| 34 // They are used in Chromium code to schedule tasks on different MessageLoops. | 30 // They are used in Chromium code to schedule tasks on different MessageLoops. |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 }; | 625 }; |
| 630 | 626 |
| 631 | 627 |
| 632 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it | 628 // Syntactic sugar to make Callbacks<void(void)> easier to declare since it |
| 633 // will be used in a lot of APIs with delayed execution. | 629 // will be used in a lot of APIs with delayed execution. |
| 634 typedef Callback<void(void)> Closure; | 630 typedef Callback<void(void)> Closure; |
| 635 | 631 |
| 636 } // namespace base | 632 } // namespace base |
| 637 | 633 |
| 638 #endif // BASE_CALLBACK_H | 634 #endif // BASE_CALLBACK_H |
| OLD | NEW |