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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "webkit/plugins/ppapi/host_array_buffer_var.h"
6
7 using ppapi::ArrayBufferVar;
8 using WebKit::WebArrayBuffer;
9
10 namespace webkit {
11 namespace ppapi {
12
13 HostArrayBufferVar::HostArrayBufferVar(uint32 size_in_bytes)
14 : buffer_(WebArrayBuffer::create(size_in_bytes, 1 /* element_size */)) {
15 }
16
17 HostArrayBufferVar::HostArrayBufferVar(const WebArrayBuffer& buffer)
18 : buffer_(buffer) {
19 }
20
21 HostArrayBufferVar::~HostArrayBufferVar() {
22 }
23
24 void* HostArrayBufferVar::Map() {
25 return buffer_.data();
26 }
27
28 uint32 HostArrayBufferVar::ByteLength() {
29 return buffer_.byteLength();
30 }
31
32 } // namespace ppapi
33 } // namespace webkit
34
OLDNEW
« 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