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 #ifndef PPAPI_SHARED_IMPL_VAR_VALUE_CONVERSIONS_H_ | 5 #ifndef PPAPI_SHARED_IMPL_VAR_VALUE_CONVERSIONS_H_ |
6 #define PPAPI_SHARED_IMPL_VAR_VALUE_CONVERSIONS_H_ | 6 #define PPAPI_SHARED_IMPL_VAR_VALUE_CONVERSIONS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // CreateValueFromVar() fails. | 46 // CreateValueFromVar() fails. |
47 PPAPI_SHARED_EXPORT base::ListValue* CreateListValueFromVarVector( | 47 PPAPI_SHARED_EXPORT base::ListValue* CreateListValueFromVarVector( |
48 const std::vector<PP_Var>& vars); | 48 const std::vector<PP_Var>& vars); |
49 | 49 |
50 // Calls CreateVarFromValue() on each element of |list_value| and puts them in | 50 // Calls CreateVarFromValue() on each element of |list_value| and puts them in |
51 // |vars|. The returned vars have had 1 ref added on behalf of the caller. | 51 // |vars|. The returned vars have had 1 ref added on behalf of the caller. |
52 // | 52 // |
53 // The conversion fails and returns false if any of the calls to | 53 // The conversion fails and returns false if any of the calls to |
54 // CreateVarFromValue() fails. In that case, |vars| is untouched. | 54 // CreateVarFromValue() fails. In that case, |vars| is untouched. |
55 PPAPI_SHARED_EXPORT bool CreateVarVectorFromListValue( | 55 PPAPI_SHARED_EXPORT bool CreateVarVectorFromListValue( |
56 const base::ListValue& list_value, std::vector<PP_Var>* vars); | 56 const base::ListValue& list_value, |
| 57 std::vector<PP_Var>* vars); |
57 | 58 |
58 } // namespace ppapi | 59 } // namespace ppapi |
59 | 60 |
60 #endif // PPAPI_SHARED_IMPL_VAR_VALUE_CONVERSIONS_H_ | 61 #endif // PPAPI_SHARED_IMPL_VAR_VALUE_CONVERSIONS_H_ |
OLD | NEW |