| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #include "ppapi/proxy/ppb_char_set_proxy.h" | 5 #include "ppapi/proxy/ppb_char_set_proxy.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "ppapi/c/dev/ppb_char_set_dev.h" | 8 #include "ppapi/c/dev/ppb_char_set_dev.h" |
| 9 #include "ppapi/c/ppb_core.h" | 9 #include "ppapi/c/ppb_core.h" |
| 10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 ppapi::thunk::GetPPB_CharSet_Thunk(), | 45 ppapi::thunk::GetPPB_CharSet_Thunk(), |
| 46 PPB_CHAR_SET_DEV_INTERFACE, | 46 PPB_CHAR_SET_DEV_INTERFACE, |
| 47 INTERFACE_ID_PPB_CHAR_SET, | 47 INTERFACE_ID_PPB_CHAR_SET, |
| 48 false, | 48 false, |
| 49 &CreateCharSetProxy, | 49 &CreateCharSetProxy, |
| 50 }; | 50 }; |
| 51 return &info; | 51 return &info; |
| 52 } | 52 } |
| 53 | 53 |
| 54 ppapi::thunk::PPB_CharSet_FunctionAPI* | 54 ppapi::thunk::PPB_CharSet_FunctionAPI* |
| 55 PPB_CharSet_Proxy::AsPPB_CharSet_FunctionAPI() { | 55 PPB_CharSet_Proxy::AsCharSet_FunctionAPI() { |
| 56 return this; | 56 return this; |
| 57 } | 57 } |
| 58 | 58 |
| 59 char* PPB_CharSet_Proxy::UTF16ToCharSet( | 59 char* PPB_CharSet_Proxy::UTF16ToCharSet( |
| 60 PP_Instance instance, | 60 PP_Instance instance, |
| 61 const uint16_t* utf16, uint32_t utf16_len, | 61 const uint16_t* utf16, uint32_t utf16_len, |
| 62 const char* output_char_set, | 62 const char* output_char_set, |
| 63 PP_CharSet_ConversionError on_error, | 63 PP_CharSet_ConversionError on_error, |
| 64 uint32_t* output_length) { | 64 uint32_t* output_length) { |
| 65 return ppapi::CharSetImpl::UTF16ToCharSet( | 65 return ppapi::CharSetImpl::UTF16ToCharSet( |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 PP_Instance instance, | 103 PP_Instance instance, |
| 104 SerializedVarReturnValue result) { | 104 SerializedVarReturnValue result) { |
| 105 ppapi::thunk::EnterFunctionNoLock<ppapi::thunk::PPB_CharSet_FunctionAPI> | 105 ppapi::thunk::EnterFunctionNoLock<ppapi::thunk::PPB_CharSet_FunctionAPI> |
| 106 enter(instance, true); | 106 enter(instance, true); |
| 107 if (enter.succeeded()) | 107 if (enter.succeeded()) |
| 108 result.Return(dispatcher(), enter.functions()->GetDefaultCharSet(instance)); | 108 result.Return(dispatcher(), enter.functions()->GetDefaultCharSet(instance)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace proxy | 111 } // namespace proxy |
| 112 } // namespace pp | 112 } // namespace pp |
| OLD | NEW |