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_STRING_PROXY_VAR_H_ | 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_STRING_PROXY_VAR_H_ |
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_STRING_PROXY_VAR_H_ | 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_STRING_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 17 matching lines...) Expand all Loading... |
28 static scoped_refptr<StringProxyVar> CastFromProxyVar( | 28 static scoped_refptr<StringProxyVar> CastFromProxyVar( |
29 SharedProxyVar proxy_var) { | 29 SharedProxyVar proxy_var) { |
30 if (proxy_var == NULL || proxy_var->pp_var_type() != PP_VARTYPE_STRING) { | 30 if (proxy_var == NULL || proxy_var->pp_var_type() != PP_VARTYPE_STRING) { |
31 scoped_refptr<StringProxyVar> string_var; | 31 scoped_refptr<StringProxyVar> string_var; |
32 return string_var; | 32 return string_var; |
33 } | 33 } |
34 return scoped_refptr<StringProxyVar>( | 34 return scoped_refptr<StringProxyVar>( |
35 static_cast<StringProxyVar*>(proxy_var.get())); | 35 static_cast<StringProxyVar*>(proxy_var.get())); |
36 } | 36 } |
37 | 37 |
| 38 protected: |
| 39 virtual ~StringProxyVar() {} |
| 40 |
38 private: | 41 private: |
39 std::string contents_; | 42 std::string contents_; |
40 }; | 43 }; |
41 | 44 |
42 typedef scoped_refptr<StringProxyVar> SharedStringProxyVar; | 45 typedef scoped_refptr<StringProxyVar> SharedStringProxyVar; |
43 | 46 |
44 } // namespace ppapi_proxy | 47 } // namespace ppapi_proxy |
45 | 48 |
46 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_STRING_PROXY_VAR_H_ | 49 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_STRING_PROXY_VAR_H_ |
OLD | NEW |