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 #ifndef PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_
6 #define PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_
10 #include "base/basictypes.h"
11 #include "ppapi/c/pp_stdint.h"
12 #include "ppapi/shared_impl/var.h"
16 // Represents a plugin-side ArrayBufferVar. In the plugin process, it's
18 class PluginArrayBufferVar
: public ArrayBufferVar
{
20 explicit PluginArrayBufferVar(uint32 size_in_bytes
);
21 virtual ~PluginArrayBufferVar();
23 // ArrayBufferVar implementation.
24 virtual void* Map() OVERRIDE
;
25 virtual void Unmap() OVERRIDE
;
26 virtual uint32
ByteLength() OVERRIDE
;
29 // TODO(dmichael): Use shared memory for this.
30 std::vector
<uint8
> buffer_
;
32 DISALLOW_COPY_AND_ASSIGN(PluginArrayBufferVar
);
37 #endif // PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_