OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_ARRAY_BUFFER_PROXY_VAR_H_ | 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_ARRAY_BUFFER_PROXY_VAR_H_ |
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_ARRAY_BUFFER_PROXY_VAR_H_ | 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_ARRAY_BUFFER_PROXY_VAR_H_ |
7 | 7 |
8 #include "native_client/src/include/nacl_memory.h" | 8 #include "native_client/src/include/nacl_memory.h" |
9 #include "native_client/src/shared/ppapi_proxy/proxy_var.h" | 9 #include "native_client/src/shared/ppapi_proxy/proxy_var.h" |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 SharedProxyVar proxy_var) { | 27 SharedProxyVar proxy_var) { |
28 if (proxy_var == NULL || | 28 if (proxy_var == NULL || |
29 proxy_var->pp_var_type() != PP_VARTYPE_ARRAY_BUFFER) { | 29 proxy_var->pp_var_type() != PP_VARTYPE_ARRAY_BUFFER) { |
30 scoped_refptr<ArrayBufferProxyVar> null_ptr; | 30 scoped_refptr<ArrayBufferProxyVar> null_ptr; |
31 return null_ptr; | 31 return null_ptr; |
32 } | 32 } |
33 return scoped_refptr<ArrayBufferProxyVar>( | 33 return scoped_refptr<ArrayBufferProxyVar>( |
34 static_cast<ArrayBufferProxyVar*>(proxy_var.get())); | 34 static_cast<ArrayBufferProxyVar*>(proxy_var.get())); |
35 } | 35 } |
36 | 36 |
| 37 protected: |
| 38 virtual ~ArrayBufferProxyVar() {} |
| 39 |
37 private: | 40 private: |
38 std::vector<uint8_t> buffer_; | 41 std::vector<uint8_t> buffer_; |
39 }; | 42 }; |
40 | 43 |
41 typedef scoped_refptr<ArrayBufferProxyVar> SharedArrayBufferProxyVar; | 44 typedef scoped_refptr<ArrayBufferProxyVar> SharedArrayBufferProxyVar; |
42 | 45 |
43 } // namespace ppapi_proxy | 46 } // namespace ppapi_proxy |
44 | 47 |
45 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_ARRAY_BUFFER_PROXY_VAR_H_ | 48 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_ARRAY_BUFFER_PROXY_VAR_H_ |
OLD | NEW |