Index: ppapi/thunk/enter.h |
diff --git a/ppapi/thunk/enter.h b/ppapi/thunk/enter.h |
index 4641cbb626468bdb59259a8c5a118c3a7186e563..a749b908b5039d15d135b15bf0ca41517fae5ea0 100644 |
--- a/ppapi/thunk/enter.h |
+++ b/ppapi/thunk/enter.h |
@@ -72,12 +72,8 @@ struct LockOnEntry<false> { |
template <> |
struct LockOnEntry<true> { |
- LockOnEntry() { |
- ppapi::ProxyLock::Acquire(); |
- } |
- ~LockOnEntry() { |
- ppapi::ProxyLock::Release(); |
- } |
+ LockOnEntry() { ppapi::ProxyLock::Acquire(); } |
+ ~LockOnEntry() { ppapi::ProxyLock::Release(); } |
}; |
// Keep non-templatized since we need non-inline functions here. |
@@ -87,7 +83,8 @@ class PPAPI_THUNK_EXPORT EnterBase { |
explicit EnterBase(PP_Resource resource); |
EnterBase(PP_Instance instance, SingletonResourceID resource_id); |
EnterBase(PP_Resource resource, const PP_CompletionCallback& callback); |
- EnterBase(PP_Instance instance, SingletonResourceID resource_id, |
+ EnterBase(PP_Instance instance, |
+ SingletonResourceID resource_id, |
const PP_CompletionCallback& callback); |
virtual ~EnterBase(); |
@@ -169,16 +166,16 @@ class PPAPI_THUNK_EXPORT EnterBase { |
// EnterResource --------------------------------------------------------------- |
-template<typename ResourceT, bool lock_on_entry = true> |
+template <typename ResourceT, bool lock_on_entry = true> |
class EnterResource |
: public subtle::LockOnEntry<lock_on_entry>, // Must be first; see above. |
public subtle::EnterBase { |
public: |
- EnterResource(PP_Resource resource, bool report_error) |
- : EnterBase(resource) { |
+ EnterResource(PP_Resource resource, bool report_error) : EnterBase(resource) { |
Init(resource, report_error); |
} |
- EnterResource(PP_Resource resource, const PP_CompletionCallback& callback, |
+ EnterResource(PP_Resource resource, |
+ const PP_CompletionCallback& callback, |
bool report_error) |
: EnterBase(resource, callback) { |
Init(resource, report_error); |
@@ -207,17 +204,15 @@ class EnterResource |
// ---------------------------------------------------------------------------- |
// Like EnterResource but assumes the lock is already held. |
-template<typename ResourceT> |
+template <typename ResourceT> |
class EnterResourceNoLock : public EnterResource<ResourceT, false> { |
public: |
EnterResourceNoLock(PP_Resource resource, bool report_error) |
- : EnterResource<ResourceT, false>(resource, report_error) { |
- } |
+ : EnterResource<ResourceT, false>(resource, report_error) {} |
EnterResourceNoLock(PP_Resource resource, |
const PP_CompletionCallback& callback, |
bool report_error) |
- : EnterResource<ResourceT, false>(resource, callback, report_error) { |
- } |
+ : EnterResource<ResourceT, false>(resource, callback, report_error) {} |
}; |
// EnterInstance --------------------------------------------------------------- |
@@ -227,8 +222,7 @@ class PPAPI_THUNK_EXPORT EnterInstance |
public subtle::EnterBase { |
public: |
explicit EnterInstance(PP_Instance instance); |
- EnterInstance(PP_Instance instance, |
- const PP_CompletionCallback& callback); |
+ EnterInstance(PP_Instance instance, const PP_CompletionCallback& callback); |
~EnterInstance(); |
bool succeeded() const { return !!functions_; } |
@@ -257,20 +251,18 @@ class PPAPI_THUNK_EXPORT EnterInstanceNoLock |
// EnterInstanceAPI ------------------------------------------------------------ |
-template<typename ApiT, bool lock_on_entry = true> |
+template <typename ApiT, bool lock_on_entry = true> |
class EnterInstanceAPI |
: public subtle::LockOnEntry<lock_on_entry>, // Must be first; see above |
public subtle::EnterBase { |
public: |
explicit EnterInstanceAPI(PP_Instance instance) |
- : EnterBase(instance, ApiT::kSingletonResourceID), |
- functions_(NULL) { |
+ : EnterBase(instance, ApiT::kSingletonResourceID), functions_(NULL) { |
if (resource_) |
functions_ = resource_->GetAs<ApiT>(); |
SetStateForFunctionError(instance, functions_, true); |
} |
- EnterInstanceAPI(PP_Instance instance, |
- const PP_CompletionCallback& callback) |
+ EnterInstanceAPI(PP_Instance instance, const PP_CompletionCallback& callback) |
: EnterBase(instance, ApiT::kSingletonResourceID, callback), |
functions_(NULL) { |
if (resource_) |
@@ -288,12 +280,11 @@ class EnterInstanceAPI |
ApiT* functions_; |
}; |
-template<typename ApiT> |
+template <typename ApiT> |
class EnterInstanceAPINoLock : public EnterInstanceAPI<ApiT, false> { |
public: |
explicit EnterInstanceAPINoLock(PP_Instance instance) |
- : EnterInstanceAPI<ApiT, false>(instance) { |
- } |
+ : EnterInstanceAPI<ApiT, false>(instance) {} |
}; |
// EnterResourceCreation ------------------------------------------------------- |