Fix iOS build for XCode 4.6.
[chromium-blink-merge.git] / ppapi / proxy / plugin_array_buffer_var.h
blob2eed216f4052dec5210fbb6683f7174242e16a11
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_
8 #include <vector>
10 #include "base/basictypes.h"
11 #include "ppapi/c/pp_stdint.h"
12 #include "ppapi/shared_impl/var.h"
14 namespace ppapi {
16 // Represents a plugin-side ArrayBufferVar. In the plugin process, it's
17 // owned as a vector.
18 class PluginArrayBufferVar : public ArrayBufferVar {
19 public:
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;
28 private:
29 // TODO(dmichael): Use shared memory for this.
30 std::vector<uint8> buffer_;
32 DISALLOW_COPY_AND_ASSIGN(PluginArrayBufferVar);
35 } // namespace ppapi
37 #endif // PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_