| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_THUNK_ENTER_H_ | 5 #ifndef PPAPI_THUNK_ENTER_H_ |
| 6 #define PPAPI_THUNK_ENTER_H_ | 6 #define PPAPI_THUNK_ENTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 // ---------------------------------------------------------------------------- | 197 // ---------------------------------------------------------------------------- |
| 198 | 198 |
| 199 // Like EnterResource but assumes the lock is already held. | 199 // Like EnterResource but assumes the lock is already held. |
| 200 template<typename ResourceT> | 200 template<typename ResourceT> |
| 201 class EnterResourceNoLock : public EnterResource<ResourceT, false> { | 201 class EnterResourceNoLock : public EnterResource<ResourceT, false> { |
| 202 public: | 202 public: |
| 203 EnterResourceNoLock(PP_Resource resource, bool report_error) | 203 EnterResourceNoLock(PP_Resource resource, bool report_error) |
| 204 : EnterResource<ResourceT, false>(resource, report_error) { | 204 : EnterResource<ResourceT, false>(resource, report_error) { |
| 205 } | 205 } |
| 206 EnterResourceNoLock(PP_Resource resource, PP_CompletionCallback callback, | 206 EnterResourceNoLock(PP_Resource resource, |
| 207 const PP_CompletionCallback& callback, |
| 207 bool report_error) | 208 bool report_error) |
| 208 : EnterResource<ResourceT, false>(resource, callback, report_error) { | 209 : EnterResource<ResourceT, false>(resource, callback, report_error) { |
| 209 } | 210 } |
| 210 }; | 211 }; |
| 211 | 212 |
| 212 // EnterInstance --------------------------------------------------------------- | 213 // EnterInstance --------------------------------------------------------------- |
| 213 | 214 |
| 214 class PPAPI_THUNK_EXPORT EnterInstance | 215 class PPAPI_THUNK_EXPORT EnterInstance |
| 215 : public subtle::EnterBase, | 216 : public subtle::EnterBase, |
| 216 public subtle::LockOnEntry<true> { | 217 public subtle::LockOnEntry<true> { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 ResourceCreationAPI* functions() { return functions_; } | 270 ResourceCreationAPI* functions() { return functions_; } |
| 270 | 271 |
| 271 private: | 272 private: |
| 272 ResourceCreationAPI* functions_; | 273 ResourceCreationAPI* functions_; |
| 273 }; | 274 }; |
| 274 | 275 |
| 275 } // namespace thunk | 276 } // namespace thunk |
| 276 } // namespace ppapi | 277 } // namespace ppapi |
| 277 | 278 |
| 278 #endif // PPAPI_THUNK_ENTER_H_ | 279 #endif // PPAPI_THUNK_ENTER_H_ |
| OLD | NEW |