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

Side by Side Diff: ppapi/api/dev/ppb_resource_array_dev.idl

Issue 9111008: Introduce PPB_ResourceArray_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 11 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
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/c/dev/ppb_resource_array_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6 /**
7 * This file defines the <code>PPB_ResourceArray_Dev</code> interface.
8 */
9 label Chrome {
10 M18 = 0.1
11 };
12
13 /**
14 * A resource array holds a list of resources and retains a reference to each of
15 * them.
16 */
17 interface PPB_ResourceArray_Dev {
18 /**
19 * Creates a resource array.
20 * Note: It will add a reference to each of the elements.
21 *
22 * @param[in] elements <code>PP_Resource</code>s to be stored in the created
23 * resource array.
24 * @param[in] size The number of elements.
25 *
26 * @return A <code>PP_Resource</code> corresponding to a resource array if
27 * successful; 0 if failed.
28 */
29 PP_Resource Create([in] PP_Instance instance,
30 [in, size_as=size] PP_Resource[] elements,
31 [in] uint32_t size);
32
33 /**
34 * Determines if the provided resource is a resource array.
35 *
36 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
37 * resource.
38 *
39 * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given
40 * resource is a resource array, otherwise <code>PP_FALSE</code>.
41 */
42 PP_Bool IsResourceArray([in] PP_Resource resource);
43
44 /**
45 * Gets the array size.
46 *
47 * @param[in] resource_array The resource array.
48 *
49 * @return How many elements are there in the array.
50 */
51 uint32_t GetSize([in] PP_Resource resource_array);
52
53 /**
54 * Gets the element at the specified position.
55 * Note: It doesn't add a reference to the returned resource for the caller.
56 *
57 * @param[in] resource_array The resource array.
58 * @param[in] index An integer indicating a position in the array.
59 *
60 * @return A <code>PP_Resource</code>. Returns 0 if the index is out of range.
61 */
62 PP_Resource GetAt(
63 [in] PP_Resource resource_array,
64 [in] uint32_t index);
65 };
OLDNEW
« no previous file with comments | « chrome/test/ui/ppapi_uitest.cc ('k') | ppapi/c/dev/ppb_resource_array_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698