| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
| 10 #include "ppapi/shared_impl/api_id.h" | 10 #include "ppapi/shared_impl/api_id.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool failed() const { return !functions_; } | 87 bool failed() const { return !functions_; } |
| 88 | 88 |
| 89 FunctionsT* functions() { return functions_; } | 89 FunctionsT* functions() { return functions_; } |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 FunctionsT* functions_; | 92 FunctionsT* functions_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(EnterFunction); | 94 DISALLOW_COPY_AND_ASSIGN(EnterFunction); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 // Like EnterResource but assumes the lock is already held. | 97 // Like EnterFunction but assumes the lock is already held. |
| 98 template<typename FunctionsT> | 98 template<typename FunctionsT> |
| 99 class EnterFunctionNoLock : public EnterFunction<FunctionsT, false> { | 99 class EnterFunctionNoLock : public EnterFunction<FunctionsT, false> { |
| 100 public: | 100 public: |
| 101 EnterFunctionNoLock(PP_Instance instance, bool report_error) | 101 EnterFunctionNoLock(PP_Instance instance, bool report_error) |
| 102 : EnterFunction<FunctionsT, false>(instance, report_error) { | 102 : EnterFunction<FunctionsT, false>(instance, report_error) { |
| 103 } | 103 } |
| 104 }; | 104 }; |
| 105 | 105 |
| 106 // Used when a caller has a resource, and wants to do EnterFunction for the | 106 // Used when a caller has a resource, and wants to do EnterFunction for the |
| 107 // instance corresponding to that resource. | 107 // instance corresponding to that resource. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 : public EnterFunctionNoLock<PPB_Instance_FunctionAPI> { | 175 : public EnterFunctionNoLock<PPB_Instance_FunctionAPI> { |
| 176 public: | 176 public: |
| 177 EnterInstance(PP_Instance instance); | 177 EnterInstance(PP_Instance instance); |
| 178 ~EnterInstance(); | 178 ~EnterInstance(); |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace thunk | 181 } // namespace thunk |
| 182 } // namespace ppapi | 182 } // namespace ppapi |
| 183 | 183 |
| 184 #endif // PPAPI_THUNK_ENTER_H_ | 184 #endif // PPAPI_THUNK_ENTER_H_ |
| OLD | NEW |