mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Apply clang-format to all C, C++ and ObjC files (issue #2171)
This commit is contained in:
@ -83,8 +83,8 @@
|
||||
// updated to match.
|
||||
|
||||
#include "include/base/cef_bind.h"
|
||||
#include "include/base/cef_callback.h"
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_callback.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_weak_ptr.h"
|
||||
@ -102,8 +102,7 @@ class CancelableCallback<void(void)> {
|
||||
|
||||
// |callback| must not be null.
|
||||
explicit CancelableCallback(const base::Callback<void(void)>& callback)
|
||||
: weak_factory_(this),
|
||||
callback_(callback) {
|
||||
: weak_factory_(this), callback_(callback) {
|
||||
DCHECK(!callback.is_null());
|
||||
InitializeForwarder();
|
||||
}
|
||||
@ -118,9 +117,7 @@ class CancelableCallback<void(void)> {
|
||||
}
|
||||
|
||||
// Returns true if the wrapped callback has been cancelled.
|
||||
bool IsCancelled() const {
|
||||
return callback_.is_null();
|
||||
}
|
||||
bool IsCancelled() const { return callback_.is_null(); }
|
||||
|
||||
// Sets |callback| as the closure that may be cancelled. |callback| may not
|
||||
// be null. Outstanding and any previously wrapped callbacks are cancelled.
|
||||
@ -137,14 +134,10 @@ class CancelableCallback<void(void)> {
|
||||
}
|
||||
|
||||
// Returns a callback that can be disabled by calling Cancel().
|
||||
const base::Callback<void(void)>& callback() const {
|
||||
return forwarder_;
|
||||
}
|
||||
const base::Callback<void(void)>& callback() const { return forwarder_; }
|
||||
|
||||
private:
|
||||
void Forward() {
|
||||
callback_.Run();
|
||||
}
|
||||
void Forward() { callback_.Run(); }
|
||||
|
||||
// Helper method to bind |forwarder_| using a weak pointer from
|
||||
// |weak_factory_|.
|
||||
@ -154,7 +147,7 @@ class CancelableCallback<void(void)> {
|
||||
}
|
||||
|
||||
// Used to ensure Forward() is not run when this object is destroyed.
|
||||
base::WeakPtrFactory<CancelableCallback<void(void)> > weak_factory_;
|
||||
base::WeakPtrFactory<CancelableCallback<void(void)>> weak_factory_;
|
||||
|
||||
// The wrapper closure.
|
||||
base::Callback<void(void)> forwarder_;
|
||||
@ -172,8 +165,7 @@ class CancelableCallback<void(A1)> {
|
||||
|
||||
// |callback| must not be null.
|
||||
explicit CancelableCallback(const base::Callback<void(A1)>& callback)
|
||||
: weak_factory_(this),
|
||||
callback_(callback) {
|
||||
: weak_factory_(this), callback_(callback) {
|
||||
DCHECK(!callback.is_null());
|
||||
InitializeForwarder();
|
||||
}
|
||||
@ -188,9 +180,7 @@ class CancelableCallback<void(A1)> {
|
||||
}
|
||||
|
||||
// Returns true if the wrapped callback has been cancelled.
|
||||
bool IsCancelled() const {
|
||||
return callback_.is_null();
|
||||
}
|
||||
bool IsCancelled() const { return callback_.is_null(); }
|
||||
|
||||
// Sets |callback| as the closure that may be cancelled. |callback| may not
|
||||
// be null. Outstanding and any previously wrapped callbacks are cancelled.
|
||||
@ -207,14 +197,10 @@ class CancelableCallback<void(A1)> {
|
||||
}
|
||||
|
||||
// Returns a callback that can be disabled by calling Cancel().
|
||||
const base::Callback<void(A1)>& callback() const {
|
||||
return forwarder_;
|
||||
}
|
||||
const base::Callback<void(A1)>& callback() const { return forwarder_; }
|
||||
|
||||
private:
|
||||
void Forward(A1 a1) const {
|
||||
callback_.Run(a1);
|
||||
}
|
||||
void Forward(A1 a1) const { callback_.Run(a1); }
|
||||
|
||||
// Helper method to bind |forwarder_| using a weak pointer from
|
||||
// |weak_factory_|.
|
||||
@ -224,7 +210,7 @@ class CancelableCallback<void(A1)> {
|
||||
}
|
||||
|
||||
// Used to ensure Forward() is not run when this object is destroyed.
|
||||
base::WeakPtrFactory<CancelableCallback<void(A1)> > weak_factory_;
|
||||
base::WeakPtrFactory<CancelableCallback<void(A1)>> weak_factory_;
|
||||
|
||||
// The wrapper closure.
|
||||
base::Callback<void(A1)> forwarder_;
|
||||
@ -242,8 +228,7 @@ class CancelableCallback<void(A1, A2)> {
|
||||
|
||||
// |callback| must not be null.
|
||||
explicit CancelableCallback(const base::Callback<void(A1, A2)>& callback)
|
||||
: weak_factory_(this),
|
||||
callback_(callback) {
|
||||
: weak_factory_(this), callback_(callback) {
|
||||
DCHECK(!callback.is_null());
|
||||
InitializeForwarder();
|
||||
}
|
||||
@ -258,9 +243,7 @@ class CancelableCallback<void(A1, A2)> {
|
||||
}
|
||||
|
||||
// Returns true if the wrapped callback has been cancelled.
|
||||
bool IsCancelled() const {
|
||||
return callback_.is_null();
|
||||
}
|
||||
bool IsCancelled() const { return callback_.is_null(); }
|
||||
|
||||
// Sets |callback| as the closure that may be cancelled. |callback| may not
|
||||
// be null. Outstanding and any previously wrapped callbacks are cancelled.
|
||||
@ -277,14 +260,10 @@ class CancelableCallback<void(A1, A2)> {
|
||||
}
|
||||
|
||||
// Returns a callback that can be disabled by calling Cancel().
|
||||
const base::Callback<void(A1, A2)>& callback() const {
|
||||
return forwarder_;
|
||||
}
|
||||
const base::Callback<void(A1, A2)>& callback() const { return forwarder_; }
|
||||
|
||||
private:
|
||||
void Forward(A1 a1, A2 a2) const {
|
||||
callback_.Run(a1, a2);
|
||||
}
|
||||
void Forward(A1 a1, A2 a2) const { callback_.Run(a1, a2); }
|
||||
|
||||
// Helper method to bind |forwarder_| using a weak pointer from
|
||||
// |weak_factory_|.
|
||||
@ -294,7 +273,7 @@ class CancelableCallback<void(A1, A2)> {
|
||||
}
|
||||
|
||||
// Used to ensure Forward() is not run when this object is destroyed.
|
||||
base::WeakPtrFactory<CancelableCallback<void(A1, A2)> > weak_factory_;
|
||||
base::WeakPtrFactory<CancelableCallback<void(A1, A2)>> weak_factory_;
|
||||
|
||||
// The wrapper closure.
|
||||
base::Callback<void(A1, A2)> forwarder_;
|
||||
|
Reference in New Issue
Block a user