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

Unified Diff: webkit/plugins/ppapi/host_array_buffer_var.cc

Issue 8930010: Implement in-process PPB_VarArrayBuffer_Dev. (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 | « webkit/plugins/ppapi/host_array_buffer_var.h ('k') | webkit/plugins/ppapi/host_var_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/host_array_buffer_var.cc
diff --git a/webkit/plugins/ppapi/host_array_buffer_var.cc b/webkit/plugins/ppapi/host_array_buffer_var.cc
new file mode 100644
index 0000000000000000000000000000000000000000..248ff856235fb0de3c1bd0bc793986d191cbf2f4
--- /dev/null
+++ b/webkit/plugins/ppapi/host_array_buffer_var.cc
@@ -0,0 +1,34 @@
+// 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.
+
+#include "webkit/plugins/ppapi/host_array_buffer_var.h"
+
+using ppapi::ArrayBufferVar;
+using WebKit::WebArrayBuffer;
+
+namespace webkit {
+namespace ppapi {
+
+HostArrayBufferVar::HostArrayBufferVar(uint32 size_in_bytes)
+ : buffer_(WebArrayBuffer::create(size_in_bytes, 1 /* element_size */)) {
+}
+
+HostArrayBufferVar::HostArrayBufferVar(const WebArrayBuffer& buffer)
+ : buffer_(buffer) {
+}
+
+HostArrayBufferVar::~HostArrayBufferVar() {
+}
+
+void* HostArrayBufferVar::Map() {
+ return buffer_.data();
+}
+
+uint32 HostArrayBufferVar::ByteLength() {
+ return buffer_.byteLength();
+}
+
+} // namespace ppapi
+} // namespace webkit
+
« no previous file with comments | « webkit/plugins/ppapi/host_array_buffer_var.h ('k') | webkit/plugins/ppapi/host_var_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698