| 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_WEBKIT_PLUGINS_PPAPI_HOST_ARRAY_BUFFER_VAR_H_ |
| 6 #define PPAPI_WEBKIT_PLUGINS_PPAPI_HOST_ARRAY_BUFFER_VAR_H_ |
| 7 |
| 8 #include "ppapi/shared_impl/var.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebArrayBuffer.h" |
| 10 |
| 11 namespace webkit { |
| 12 namespace ppapi { |
| 13 |
| 14 // Represents a host-side ArrayBufferVar. |
| 15 class HostArrayBufferVar : public ::ppapi::ArrayBufferVar { |
| 16 public: |
| 17 explicit HostArrayBufferVar(uint32 size_in_bytes); |
| 18 explicit HostArrayBufferVar(const WebKit::WebArrayBuffer& buffer); |
| 19 virtual ~HostArrayBufferVar(); |
| 20 |
| 21 // ArrayBufferVar implementation. |
| 22 virtual void* Map() OVERRIDE; |
| 23 virtual uint32 ByteLength() OVERRIDE; |
| 24 |
| 25 WebKit::WebArrayBuffer& webkit_buffer() { return buffer_; } |
| 26 |
| 27 private: |
| 28 WebKit::WebArrayBuffer buffer_; |
| 29 |
| 30 DISALLOW_COPY_AND_ASSIGN(HostArrayBufferVar); |
| 31 }; |
| 32 |
| 33 } // namespace ppapi |
| 34 } // namespace webkit |
| 35 |
| 36 #endif // PPAPI_WEBKIT_PLUGINS_PPAPI_HOST_ARRAY_BUFFER_VAR_H_ |
| OLD | NEW |