mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update include/base headers for C++11/14 (see issue #3140)
See the issue for update guidelines.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user