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

Unified Diff: ppapi/cpp/dev/array_buffer_dev.h

Issue 8502030: Draft of a PPAPI interface for ArrayBuffer and typed arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops, remove Resize Created 9 years, 1 month 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
Index: ppapi/cpp/dev/array_buffer_dev.h
diff --git a/ppapi/cpp/dev/array_buffer_dev.h b/ppapi/cpp/dev/array_buffer_dev.h
new file mode 100644
index 0000000000000000000000000000000000000000..aae545989f8b6aa45ad3dd87ee73d7f5b4674437
--- /dev/null
+++ b/ppapi/cpp/dev/array_buffer_dev.h
@@ -0,0 +1,32 @@
+// 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.
+
+#ifndef PPAPI_CPP_DEV_ARRAY_BUFFER_DEV_H_
+#define PPAPI_CPP_DEV_ARRAY_BUFFER_DEV_H_
+
+#include "ppapi/cpp/var.h"
+
+namespace pp {
+class Var;
+}
+
+template <class T>
+class ArrayBuffer_Dev : public Var {
+ public:
+ ArrayBuffer_Dev();
+ explicit ArrayBuffer_Dev(const Var& var);
+ explicit ArrayBuffer_Dev(const ArrayBuffer& buffer) : Var(buffer) {}
+ explicit ArrayBuffer_Dev(uint32_t size_in_bytes);
+
+ uint32_t ByteLength() const;
+
+ void* GetBuffer();
+ const void* GetBuffer() const;
+
+ virtual ~ArrayBuffer_Dev() {}
+};
+
+} // namespace pp
+
+#endif // PPAPI_CPP_DEV_ARRAY_BUFFER_DEV_H_
« ppapi/api/pp_var.idl ('K') | « ppapi/c/pp_var.h ('k') | ppapi/cpp/dev/array_buffer_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698