callback_forward.h 680 B

123456789101112131415161718192021222324
  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
  3. // found in the LICENSE file.
  4. #ifndef BASE_CALLBACK_FORWARD_H_
  5. #define BASE_CALLBACK_FORWARD_H_
  6. namespace base {
  7. template <typename Signature>
  8. class OnceCallback;
  9. template <typename Signature>
  10. class RepeatingCallback;
  11. // Syntactic sugar to make OnceClosure<void()> and RepeatingClosure<void()>
  12. // easier to declare since they will be used in a lot of APIs with delayed
  13. // execution.
  14. using OnceClosure = OnceCallback<void()>;
  15. using RepeatingClosure = RepeatingCallback<void()>;
  16. } // namespace base
  17. #endif // BASE_CALLBACK_FORWARD_H_