Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: ppapi/api/ppb_var_array.idl

Issue 16136009: Move PPB_VarArray and PPB_VarDictionary out of dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 5
6 /** 6 /**
7 * This file defines the <code>PPB_VarArray_Dev</code> struct providing 7 * This file defines the <code>PPB_VarArray</code> struct providing
8 * a way to interact with array vars. 8 * a way to interact with array vars.
9 */ 9 */
10 10
11 label Chrome { 11 label Chrome {
12 M27 = 0.1 12 M29 = 1.0
13 }; 13 };
14 14
15 [macro="PPB_VAR_ARRAY_DEV_INTERFACE"] 15 [macro="PPB_VAR_ARRAY_INTERFACE"]
16 interface PPB_VarArray_Dev { 16 interface PPB_VarArray {
17 /** 17 /**
18 * Creates an array var, i.e., a <code>PP_Var</code> with type set to 18 * Creates an array var, i.e., a <code>PP_Var</code> with type set to
19 * <code>PP_VARTYPE_ARRAY</code>. The array length is set to 0. 19 * <code>PP_VARTYPE_ARRAY</code>. The array length is set to 0.
20 * 20 *
21 * @return An empty array var, whose reference count is set to 1 on behalf of 21 * @return An empty array var, whose reference count is set to 1 on behalf of
22 * the caller. 22 * the caller.
23 */ 23 */
24 PP_Var Create(); 24 PP_Var Create();
25 25
26 /** 26 /**
27 * Gets an element from the array. 27 * Gets an element from the array.
28 * 28 *
29 * @param[in] array An array var. 29 * @param[in] array An array var.
30 * @param[in] index An index indicating which element to return. 30 * @param[in] index An index indicating which element to return.
31 * 31 *
32 * @return The element at the specified position. The reference count is 32 * @return The element at the specified position. The reference count of the
33 * incremented on behalf of the caller. If <code>index</code> is larger than 33 * element returned is incremented on behalf of the caller. If
34 * or equal to the array length, an undefined var is returned. 34 * <code>index</code> is larger than or equal to the array length, an
35 * undefined var is returned.
35 */ 36 */
36 PP_Var Get([in] PP_Var array, [in] uint32_t index); 37 PP_Var Get([in] PP_Var array, [in] uint32_t index);
raymes 2013/06/09 06:23:32 noelallen@: Doc is a bit unclear... How is the re
37 38
38 /** 39 /**
39 * Sets the value of an element in the array. 40 * Sets the value of an element in the array.
40 * 41 *
41 * @param[in] array An array var. 42 * @param[in] array An array var.
42 * @param[in] index An index indicating which element to modify. If 43 * @param[in] index An index indicating which element to modify. If
43 * <code>index</code> is larger than or equal to the array length, the length 44 * <code>index</code> is larger than or equal to the array length, the length
44 * is updated to be <code>index</code> + 1. Any position in the array that 45 * is updated to be <code>index</code> + 1. Any position in the array that
45 * hasn't been set before is set to undefined, i.e., <code>PP_Var</code> of 46 * hasn't been set before is set to undefined, i.e., <code>PP_Var</code> of
46 * type <code>PP_VARTYPE_UNDEFINED</code>. 47 * type <code>PP_VARTYPE_UNDEFINED</code>.
(...skipping 12 matching lines...) Expand all
59 * @return The array length. 60 * @return The array length.
60 */ 61 */
61 uint32_t GetLength([in] PP_Var array); 62 uint32_t GetLength([in] PP_Var array);
62 63
63 /** 64 /**
64 * Sets the array length. 65 * Sets the array length.
65 * 66 *
66 * @param[in] array An array var. 67 * @param[in] array An array var.
67 * @param[in] length The new array length. If <code>length</code> is smaller 68 * @param[in] length The new array length. If <code>length</code> is smaller
68 * than its current value, the array is truncated to the new length; any 69 * than its current value, the array is truncated to the new length; any
69 * elements that no longer fit are removed. If <code>length</code> is larger 70 * elements that no longer fit are removed and the references to them will be
70 * than its current value, undefined vars are appended to increase the array 71 * released. If <code>length</code> is larger than its current value,
71 * to the specified length. 72 * undefined vars are appended to increase the array to the specified length.
72 * 73 *
73 * @return A <code>PP_Bool</code> indicating whether the operation succeeds. 74 * @return A <code>PP_Bool</code> indicating whether the operation succeeds.
74 */ 75 */
75 PP_Bool SetLength([in] PP_Var array, [in] uint32_t length); 76 PP_Bool SetLength([in] PP_Var array, [in] uint32_t length);
raymes 2013/06/09 06:23:32 noelallen@: Doc consistency... If all the other f
76 }; 77 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698