OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PROXY_PPB_CHAR_SET_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ |
7 | 7 |
8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/proxy/interface_proxy.h" | 10 #include "ppapi/proxy/interface_proxy.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 class PPB_CharSet_Proxy : public ppapi::FunctionGroupBase, | 22 class PPB_CharSet_Proxy : public ppapi::FunctionGroupBase, |
23 public ppapi::thunk::PPB_CharSet_FunctionAPI, | 23 public ppapi::thunk::PPB_CharSet_FunctionAPI, |
24 public InterfaceProxy { | 24 public InterfaceProxy { |
25 public: | 25 public: |
26 PPB_CharSet_Proxy(Dispatcher* dispatcher, const void* target_interface); | 26 PPB_CharSet_Proxy(Dispatcher* dispatcher, const void* target_interface); |
27 virtual ~PPB_CharSet_Proxy(); | 27 virtual ~PPB_CharSet_Proxy(); |
28 | 28 |
29 static const Info* GetInfo(); | 29 static const Info* GetInfo(); |
30 | 30 |
31 // FunctionGroupBase overrides. | 31 // FunctionGroupBase overrides. |
32 virtual ppapi::thunk::PPB_CharSet_FunctionAPI* AsPPB_CharSet_FunctionAPI() | 32 virtual ppapi::thunk::PPB_CharSet_FunctionAPI* AsCharSet_FunctionAPI() |
33 OVERRIDE; | 33 OVERRIDE; |
34 | 34 |
35 // PPB_CharSet_FunctionAPI implementation. | 35 // PPB_CharSet_FunctionAPI implementation. |
36 virtual char* UTF16ToCharSet(PP_Instance instance, | 36 virtual char* UTF16ToCharSet(PP_Instance instance, |
37 const uint16_t* utf16, uint32_t utf16_len, | 37 const uint16_t* utf16, uint32_t utf16_len, |
38 const char* output_char_set, | 38 const char* output_char_set, |
39 PP_CharSet_ConversionError on_error, | 39 PP_CharSet_ConversionError on_error, |
40 uint32_t* output_length) OVERRIDE; | 40 uint32_t* output_length) OVERRIDE; |
41 virtual uint16_t* CharSetToUTF16(PP_Instance instance, | 41 virtual uint16_t* CharSetToUTF16(PP_Instance instance, |
42 const char* input, uint32_t input_len, | 42 const char* input, uint32_t input_len, |
43 const char* input_char_set, | 43 const char* input_char_set, |
44 PP_CharSet_ConversionError on_error, | 44 PP_CharSet_ConversionError on_error, |
45 uint32_t* output_length) OVERRIDE; | 45 uint32_t* output_length) OVERRIDE; |
46 virtual PP_Var GetDefaultCharSet(PP_Instance instance) OVERRIDE; | 46 virtual PP_Var GetDefaultCharSet(PP_Instance instance) OVERRIDE; |
47 | 47 |
48 // InterfaceProxy implementation. | 48 // InterfaceProxy implementation. |
49 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 49 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
50 | 50 |
51 private: | 51 private: |
52 void OnMsgGetDefaultCharSet(PP_Instance instance, | 52 void OnMsgGetDefaultCharSet(PP_Instance instance, |
53 SerializedVarReturnValue result); | 53 SerializedVarReturnValue result); |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(PPB_CharSet_Proxy); | 55 DISALLOW_COPY_AND_ASSIGN(PPB_CharSet_Proxy); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace proxy | 58 } // namespace proxy |
59 } // namespace pp | 59 } // namespace pp |
60 | 60 |
61 #endif // PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ | 61 #endif // PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ |
OLD | NEW |