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 #ifndef PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ | 5 #ifndef PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ |
6 #define PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ | 6 #define PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ppapi/c/dev/ppb_char_set_dev.h" | 9 #include "ppapi/c/dev/ppb_char_set_dev.h" |
| 10 #include "ppapi/shared_impl/ppapi_shared_export.h" |
10 | 11 |
11 struct PPB_Memory_Dev; | 12 struct PPB_Memory_Dev; |
12 | 13 |
13 namespace ppapi { | 14 namespace ppapi { |
14 | 15 |
15 // Contains the implementation of character set conversion that is shared | 16 // Contains the implementation of character set conversion that is shared |
16 // between the proxy and the renderer. | 17 // between the proxy and the renderer. |
17 class CharSetImpl { | 18 class PPAPI_SHARED_EXPORT CharSetImpl { |
18 public: | 19 public: |
19 static char* UTF16ToCharSet(const PPB_Memory_Dev* memory, | 20 static char* UTF16ToCharSet(const PPB_Memory_Dev* memory, |
20 const uint16_t* utf16, | 21 const uint16_t* utf16, |
21 uint32_t utf16_len, | 22 uint32_t utf16_len, |
22 const char* output_char_set, | 23 const char* output_char_set, |
23 PP_CharSet_ConversionError on_error, | 24 PP_CharSet_ConversionError on_error, |
24 uint32_t* output_length); | 25 uint32_t* output_length); |
25 | 26 |
26 static uint16_t* CharSetToUTF16(const PPB_Memory_Dev* memory, | 27 static uint16_t* CharSetToUTF16(const PPB_Memory_Dev* memory, |
27 const char* input, | 28 const char* input, |
28 uint32_t input_len, | 29 uint32_t input_len, |
29 const char* input_char_set, | 30 const char* input_char_set, |
30 PP_CharSet_ConversionError on_error, | 31 PP_CharSet_ConversionError on_error, |
31 uint32_t* output_length); | 32 uint32_t* output_length); |
32 }; | 33 }; |
33 | 34 |
34 } // namespace ppapi | 35 } // namespace ppapi |
35 | 36 |
36 #endif // PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ | 37 #endif // PPAPI_SHARED_IMPL_CHAR_SET_IMPL_H_ |
OLD | NEW |