| Index: ppapi/proxy/plugin_array_buffer_var.cc
|
| diff --git a/ppapi/proxy/plugin_array_buffer_var.cc b/ppapi/proxy/plugin_array_buffer_var.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d88ca7bd3f96d627941ffd254ac8117650a4aac6
|
| --- /dev/null
|
| +++ b/ppapi/proxy/plugin_array_buffer_var.cc
|
| @@ -0,0 +1,31 @@
|
| +// 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 "ppapi/proxy/plugin_array_buffer_var.h"
|
| +
|
| +#include <stdlib.h>
|
| +
|
| +#include <limits>
|
| +
|
| +namespace ppapi {
|
| +
|
| +PluginArrayBufferVar::PluginArrayBufferVar(uint32 size_in_bytes)
|
| + : buffer_(size_in_bytes) {
|
| +}
|
| +
|
| +PluginArrayBufferVar::~PluginArrayBufferVar() {
|
| +}
|
| +
|
| +void* PluginArrayBufferVar::Map() {
|
| + if (buffer_.empty())
|
| + return NULL;
|
| + return &(buffer_[0]);
|
| +}
|
| +
|
| +uint32 PluginArrayBufferVar::ByteLength() {
|
| + return buffer_.size();
|
| +}
|
| +
|
| +} // namespace ppapi
|
| +
|
|
|