Update include/base headers for C++11/14 (see issue #3140)

See the issue for update guidelines.
This commit is contained in:
Marshall Greenblatt
2021-06-17 15:40:57 -04:00
parent 6d80ec69d7
commit 43f9baa23a
57 changed files with 5466 additions and 11523 deletions

View File

@ -32,12 +32,7 @@
#define INCLUDE_BASE_CEF_CALLBACK_FORWARD_H_
#pragma once
#if defined(BASE_CALLBACK_FORWARD_H_)
// Do nothing if the Chromium header has already been included.
// This can happen in cases where Chromium code is used directly by the
// client application. When using Chromium code directly always include
// the Chromium header first to avoid type conflicts.
#elif defined(USING_CHROMIUM_INCLUDES)
#if defined(USING_CHROMIUM_INCLUDES)
// When building CEF include the Chromium header directly.
#include "base/callback_forward.h"
#else // !USING_CHROMIUM_INCLUDES
@ -47,10 +42,21 @@
namespace base {
template <typename Sig>
class Callback;
template <typename Signature>
class OnceCallback;
typedef Callback<void(void)> Closure;
template <typename Signature>
class RepeatingCallback;
template <typename Signature>
using Callback = RepeatingCallback<Signature>;
// Syntactic sugar to make OnceClosure<void()> and RepeatingClosure<void()>
// easier to declare since they will be used in a lot of APIs with delayed
// execution.
using OnceClosure = OnceCallback<void()>;
using RepeatingClosure = RepeatingCallback<void()>;
using Closure = Callback<void()>;
} // namespace base