Refactor android test results logging.
[chromium-blink-merge.git] / ppapi / proxy / plugin_array_buffer_var.cc
blobc9d302fe8cb5a800b3994f97fa0b7b8499c4d828
1 // Copyright (c) 2012 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.
5 #include "ppapi/proxy/plugin_array_buffer_var.h"
7 #include <stdlib.h>
9 #include <limits>
11 namespace ppapi {
13 PluginArrayBufferVar::PluginArrayBufferVar(uint32 size_in_bytes)
14 : buffer_(size_in_bytes) {
17 PluginArrayBufferVar::~PluginArrayBufferVar() {
20 void* PluginArrayBufferVar::Map() {
21 if (buffer_.empty())
22 return NULL;
23 return &(buffer_[0]);
26 void PluginArrayBufferVar::Unmap() {
27 // We don't actually use shared memory yet, so do nothing.
30 uint32 PluginArrayBufferVar::ByteLength() {
31 return static_cast<uint32>(buffer_.size());
34 } // namespace ppapi