summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/var.h
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 06:49:00 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 06:49:00 +0000
commitddd61db54184ca4491521f8ce8f4e50a4ca5025f (patch)
tree5b39af5a2fc0910a9c33a7595432189ea716a9de /ppapi/cpp/var.h
parentd4067421c536731f986013afb0551dc0bcc164c9 (diff)
downloadchromium_src-ddd61db54184ca4491521f8ce8f4e50a4ca5025f.zip
chromium_src-ddd61db54184ca4491521f8ce8f4e50a4ca5025f.tar.gz
chromium_src-ddd61db54184ca4491521f8ce8f4e50a4ca5025f.tar.bz2
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
Diffstat (limited to 'ppapi/cpp/var.h')
-rw-r--r--ppapi/cpp/var.h3
1 files changed, 3 insertions, 0 deletions
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 <code>Var</code> is an ArrayBuffer.
+ bool is_array_buffer() const { return var_.type == PP_VARTYPE_ARRAY_BUFFER; }
+
/// AsBool() converts this <code>Var</code> to a bool. Assumes the
/// internal representation is_bool(). If it's not, it will assert in debug
/// mode, and return false.