| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "ppapi/c/ppb_var_array.h" | 5 #include "ppapi/c/ppb_var_array.h" |
| 6 #include "ppapi/shared_impl/array_var.h" | 6 #include "ppapi/shared_impl/array_var.h" |
| 7 #include "ppapi/shared_impl/proxy_lock.h" | 7 #include "ppapi/shared_impl/proxy_lock.h" |
| 8 #include "ppapi/thunk/thunk.h" | 8 #include "ppapi/thunk/thunk.h" |
| 9 | 9 |
| 10 namespace ppapi { | 10 namespace ppapi { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 PP_Bool SetLength(PP_Var array, uint32_t length) { | 50 PP_Bool SetLength(PP_Var array, uint32_t length) { |
| 51 ProxyAutoLock lock; | 51 ProxyAutoLock lock; |
| 52 | 52 |
| 53 ArrayVar* array_var = ArrayVar::FromPPVar(array); | 53 ArrayVar* array_var = ArrayVar::FromPPVar(array); |
| 54 if (!array_var) | 54 if (!array_var) |
| 55 return PP_FALSE; | 55 return PP_FALSE; |
| 56 return array_var->SetLength(length); | 56 return array_var->SetLength(length); |
| 57 } | 57 } |
| 58 | 58 |
| 59 const PPB_VarArray_1_0 g_ppb_vararray_1_0_thunk = { | 59 const PPB_VarArray_1_0 g_ppb_vararray_1_0_thunk = {&Create, &Get, &Set, |
| 60 &Create, | 60 &GetLength, &SetLength}; |
| 61 &Get, | |
| 62 &Set, | |
| 63 &GetLength, | |
| 64 &SetLength | |
| 65 }; | |
| 66 | 61 |
| 67 } // namespace | 62 } // namespace |
| 68 | 63 |
| 69 const PPB_VarArray_1_0* GetPPB_VarArray_1_0_Thunk() { | 64 const PPB_VarArray_1_0* GetPPB_VarArray_1_0_Thunk() { |
| 70 return &g_ppb_vararray_1_0_thunk; | 65 return &g_ppb_vararray_1_0_thunk; |
| 71 } | 66 } |
| 72 | 67 |
| 73 } // namespace thunk | 68 } // namespace thunk |
| 74 } // namespace ppapi | 69 } // namespace ppapi |
| OLD | NEW |