blob: f1851c4fbbf3d198637032419149b5993649c99d [file] [log] [blame]
[email protected]2d715662011-11-28 22:00:291// 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
5#ifndef BASE_CALLBACK_FORWARD_H_
6#define BASE_CALLBACK_FORWARD_H_
[email protected]2d715662011-11-28 22:00:297
8namespace base {
9
tzikd4bb5b7d2017-08-28 19:08:5210template <typename Signature>
11class OnceCallback;
tzik27d1e312016-09-13 05:28:5912
tzikd4bb5b7d2017-08-28 19:08:5213template <typename Signature>
14class RepeatingCallback;
tzik77d411392016-03-09 09:47:0315
tzikd4bb5b7d2017-08-28 19:08:5216template <typename Signature>
17using Callback = RepeatingCallback<Signature>;
[email protected]2d715662011-11-28 22:00:2918
tzik3bc7779b2015-12-19 09:18:4619// Syntactic sugar to make Callback<void()> easier to declare since it
tzikce3ecf82015-12-15 06:41:4920// will be used in a lot of APIs with delayed execution.
tzik27d1e312016-09-13 05:28:5921using OnceClosure = OnceCallback<void()>;
22using RepeatingClosure = RepeatingCallback<void()>;
tzikd4bb5b7d2017-08-28 19:08:5223using Closure = Callback<void()>;
tzik27d1e312016-09-13 05:28:5924
[email protected]2d715662011-11-28 22:00:2925} // namespace base
26
danakj0a448602015-03-10 00:31:1627#endif // BASE_CALLBACK_FORWARD_H_