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

Unified 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: merge 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/api/pp_var.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/api/dev/ppb_var_array_buffer_dev.idl
diff --git a/ppapi/api/dev/ppb_var_array_buffer_dev.idl b/ppapi/api/dev/ppb_var_array_buffer_dev.idl
new file mode 100644
index 0000000000000000000000000000000000000000..9105b114d739700d427f2039e163879d4573aea9
--- /dev/null
+++ b/ppapi/api/dev/ppb_var_array_buffer_dev.idl
@@ -0,0 +1,47 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPB_VarArrayBuffer_Dev</code> struct.
+ */
+
+label Chrome {
+ M17 = 0.1
+};
+
+/**
+ * PPB_VarArrayBuffer_Dev API. This provides a way to interact with JavaScript
+ * ArrayBuffers, which represent a contiguous sequence of bytes. To manage the
+ * reference count for a VarArrayBuffer, please see PPB_Var. Note that
+ * these Vars are not part of the embedding page's DOM, and can only be shared
+ * with JavaScript via pp::Instance's PostMessage and HandleMessage functions.
+ */
+[macro="PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE"]
+interface PPB_VarArrayBuffer_Dev {
+ /**
+ * Create a zero-initialized VarArrayBuffer.
+ *
+ * @param[in] size_in_bytes The size of the array buffer that will be created.
+ *
+ * @return A PP_Var which represents an VarArrayBuffer of the requested size
+ * with a reference count of 1.
+ */
+ PP_Var Create([in] uint32_t size_in_bytes);
+ /**
+ * Returns the length of the VarArrayBuffer in bytes.
+ *
+ * @return The length of the VarArrayBuffer in bytes.
+ */
+ uint32_t ByteLength([in] PP_Var array);
+ /**
+ * Returns a pointer to the beginning of the buffer for the given array.
+ *
+ * @param[in] array The array whose buffer should be returned.
+ *
+ * @return A pointer to the buffer for this array.
+ */
+ mem_t Map([in] PP_Var array);
+};
+
« no previous file with comments | « no previous file | ppapi/api/pp_var.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698