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

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

Issue 8502030: Draft of a PPAPI interface for ArrayBuffer and typed arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cut back down to just the API for review. Created 9 years 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
(Empty)
1 /* Copyright (c) 2011 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_VarArrayBuffer_Dev</code> struct.
8 */
9
10 label Chrome {
11 M17 = 0.1
12 };
13
14 /**
15 * PPB_VarArrayBuffer_Dev API. This provides a way to interact with JavaScript
16 * ArrayBuffers, which represent a contiguous sequence of bytes. To manage the
17 * reference count for a VarArrayBuffer, please see PPB_Var. Note that
18 * these Vars are not part of the embedding page's DOM, and can only be shared
19 * with JavaScript via pp::Instance's PostMessage and HandleMessage functions.
20 */
21 [macro="PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE"]
22 interface PPB_VarArrayBuffer_Dev {
23 /**
24 * Create a zero-initialized VarArrayBuffer.
25 *
26 * @param[in] instance A PP_Instance uniquely identifying the instance.
27 * @param[in] size_in_bytes The size of the array buffer that will be created.
28 *
29 * @return A PP_Var which represents an VarArrayBuffer of the requested size
30 * with a reference count of 1.
31 */
32 PP_Var Create([in] PP_Instance instance,
dmichael (off chromium) 2011/12/02 18:53:52 Note we want to use PP_Instance (as opposed to PP_
33 [in] uint32_t size_in_bytes);
34 /**
35 * Returns the length of the VarArrayBuffer in bytes.
36 *
37 * @return The length of the VarArrayBuffer in bytes.
38 */
39 uint32_t ByteLength([in] PP_Var array);
40 /**
41 * Returns a pointer to the beginning of the buffer for the given array.
42 *
43 * @param[in] array The array whose buffer should be returned.
44 *
45 * @return A pointer to the buffer for this array.
46 */
47 mem_t Map([in] PP_Var array);
dmichael (off chromium) 2011/12/02 18:53:52 Left out UnMap, because it seems potentially dange
48 };
49
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_var_array_buffer_dev.h » ('j') | ppapi/cpp/dev/var_array_buffer_dev.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698