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

Side by Side Diff: webkit/plugins/ppapi/host_array_buffer_var.cc

Issue 9169052: Tweaks to PPB_VarArrayBuffer in preperation for taking out of Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes based on reviews Created 8 years, 10 months 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') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/ppapi/host_array_buffer_var.h" 5 #include "webkit/plugins/ppapi/host_array_buffer_var.h"
6 6
7 using ppapi::ArrayBufferVar; 7 using ppapi::ArrayBufferVar;
8 using WebKit::WebArrayBuffer; 8 using WebKit::WebArrayBuffer;
9 9
10 namespace webkit { 10 namespace webkit {
11 namespace ppapi { 11 namespace ppapi {
12 12
13 HostArrayBufferVar::HostArrayBufferVar(uint32 size_in_bytes) 13 HostArrayBufferVar::HostArrayBufferVar(uint32 size_in_bytes)
14 : buffer_(WebArrayBuffer::create(size_in_bytes, 1 /* element_size */)) { 14 : buffer_(WebArrayBuffer::create(size_in_bytes, 1 /* element_size */)) {
15 } 15 }
16 16
17 HostArrayBufferVar::HostArrayBufferVar(const WebArrayBuffer& buffer) 17 HostArrayBufferVar::HostArrayBufferVar(const WebArrayBuffer& buffer)
18 : buffer_(buffer) { 18 : buffer_(buffer) {
19 } 19 }
20 20
21 HostArrayBufferVar::~HostArrayBufferVar() { 21 HostArrayBufferVar::~HostArrayBufferVar() {
22 } 22 }
23 23
24 void* HostArrayBufferVar::Map() { 24 void* HostArrayBufferVar::Map() {
25 return buffer_.data(); 25 return buffer_.data();
26 } 26 }
27 27
28 void HostArrayBufferVar::Unmap() {
29 // We do not used shared memory on the host side. Nothing to do.
30 }
31
28 uint32 HostArrayBufferVar::ByteLength() { 32 uint32 HostArrayBufferVar::ByteLength() {
29 return buffer_.byteLength(); 33 return buffer_.byteLength();
30 } 34 }
31 35
32 } // namespace ppapi 36 } // namespace ppapi
33 } // namespace webkit 37 } // namespace webkit
34 38
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/host_array_buffer_var.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698