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/dev/ppb_var_array_dev.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 { |
11 namespace thunk { | 11 namespace thunk { |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 PP_Var Create() { | 15 PP_Var Create() { |
(...skipping 33 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_Dev_0_1 g_ppb_vararray_0_1_thunk = { | 59 const PPB_VarArray_1_0 g_ppb_vararray_1_0_thunk = { |
60 &Create, | 60 &Create, |
61 &Get, | 61 &Get, |
62 &Set, | 62 &Set, |
63 &GetLength, | 63 &GetLength, |
64 &SetLength | 64 &SetLength |
65 }; | 65 }; |
66 | 66 |
67 } // namespace | 67 } // namespace |
68 | 68 |
69 const PPB_VarArray_Dev_0_1* GetPPB_VarArray_Dev_0_1_Thunk() { | 69 const PPB_VarArray_1_0* GetPPB_VarArray_1_0_Thunk() { |
70 return &g_ppb_vararray_0_1_thunk; | 70 return &g_ppb_vararray_1_0_thunk; |
71 } | 71 } |
72 | 72 |
73 } // namespace thunk | 73 } // namespace thunk |
74 } // namespace ppapi | 74 } // namespace ppapi |
OLD | NEW |