OLD | NEW |
---|---|
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_VarArrayBuffer_Dev</code> struct. | 7 * This file defines the <code>PPB_VarArrayBuffer</code> struct. |
8 */ | 8 */ |
9 | 9 |
10 label Chrome { | 10 label Chrome { |
11 M17 = 0.1 | 11 M18 = 1.0 |
12 }; | 12 }; |
13 | 13 |
14 /** | 14 /** |
15 * PPB_VarArrayBuffer_Dev API. This provides a way to interact with JavaScript | 15 * PPB_VarArrayBuffer API. This provides a way to interact with JavaScript |
16 * ArrayBuffers, which represent a contiguous sequence of bytes. To manage the | 16 * ArrayBuffers, which represent a contiguous sequence of bytes. To manage the |
17 * reference count for a VarArrayBuffer, please see PPB_Var. Note that | 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 | 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. | 19 * with JavaScript via pp::Instance's PostMessage and HandleMessage functions. |
20 */ | 20 */ |
21 [macro="PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE"] | 21 [macro="PPB_VAR_ARRAY_BUFFER_INTERFACE"] |
22 interface PPB_VarArrayBuffer_Dev { | 22 interface PPB_VarArrayBuffer { |
23 /** | 23 /** |
24 * Create a zero-initialized VarArrayBuffer. | 24 * Create a zero-initialized VarArrayBuffer. |
25 * | 25 * |
26 * @param[in] size_in_bytes The size of the array buffer that will be created. | 26 * @param[in] size_in_bytes The size of the array buffer that will be created. |
27 * | 27 * |
28 * @return A PP_Var which represents an VarArrayBuffer of the requested size | 28 * @return A PP_Var which represents an VarArrayBuffer of the requested size |
29 * with a reference count of 1. | 29 * with a reference count of 1. |
30 */ | 30 */ |
31 PP_Var Create([in] uint32_t size_in_bytes); | 31 PP_Var Create([in] uint32_t size_in_bytes); |
32 /** | 32 /** |
33 * Returns the length of the VarArrayBuffer in bytes. | 33 * Returns the length of the VarArrayBuffer in bytes. |
34 * | 34 * |
35 * @return The length of the VarArrayBuffer in bytes. | 35 * @return The length of the VarArrayBuffer in bytes. |
36 */ | 36 */ |
37 uint32_t ByteLength([in] PP_Var array); | 37 uint32_t ByteLength([in] PP_Var array); |
38 /** | 38 /** |
39 * Returns a pointer to the beginning of the buffer for the given array. | 39 * Returns a pointer to the beginning of the buffer for the given array. |
40 * | 40 * |
41 * @param[in] array The array whose buffer should be returned. | 41 * @param[in] array The array whose buffer should be returned. |
42 * | 42 * |
43 * @return A pointer to the buffer for this array. | 43 * @return A pointer to the buffer for this array. |
44 */ | 44 */ |
45 mem_t Map([in] PP_Var array); | 45 mem_t Map([in] PP_Var array); |
darin (slow to review)
2012/01/12 21:14:03
Can you remind me of why there is no corresponding
| |
46 }; | 46 }; |
47 | 47 |
OLD | NEW |