| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_ |
| 6 #define PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "ppapi/c/pp_stdint.h" |
| 12 #include "ppapi/shared_impl/var.h" |
| 13 |
| 14 namespace ppapi { |
| 15 |
| 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(); |
| 22 |
| 23 // ArrayBufferVar implementation. |
| 24 virtual void* Map() OVERRIDE; |
| 25 virtual uint32 ByteLength() OVERRIDE; |
| 26 |
| 27 private: |
| 28 // TODO(dmichael): Use shared memory for this. |
| 29 std::vector<uint8> buffer_; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(PluginArrayBufferVar); |
| 32 }; |
| 33 |
| 34 } // namespace ppapi |
| 35 |
| 36 #endif // PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_ |
| OLD | NEW |