From ddd61db54184ca4491521f8ce8f4e50a4ca5025f Mon Sep 17 00:00:00 2001 From: "dmichael@chromium.org" Date: Wed, 7 Dec 2011 06:49:00 +0000 Subject: Draft of a PPAPI interface for ArrayBuffer. See the TypedArray spec for reference: http://www.khronos.org/registry/typedarray/specs/latest/ Things in the spec that I'm omiting: - slice (Having a view of the ArrayBuffer that has a different offset/length) TODO in future CLs: -Implementation for in-process/trusted + tests (almost ready) -NaCl proxy -OOP proxy Later still: - Support for ArrayBufferView and TypedArray based on that. BUG=103435 TEST=N/A Review URL: http://codereview.chromium.org/8502030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113355 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/cpp/var.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ppapi/cpp/var.h') diff --git a/ppapi/cpp/var.h b/ppapi/cpp/var.h index 0cd8218..fc65d38 100644 --- a/ppapi/cpp/var.h +++ b/ppapi/cpp/var.h @@ -158,6 +158,9 @@ class Var { var_.type == PP_VARTYPE_DOUBLE; } + /// This function determines if this Var is an ArrayBuffer. + bool is_array_buffer() const { return var_.type == PP_VARTYPE_ARRAY_BUFFER; } + /// AsBool() converts this Var to a bool. Assumes the /// internal representation is_bool(). If it's not, it will assert in debug /// mode, and return false. -- cgit v1.1