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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
11 #include "ppapi/proxy/interface_proxy.h" | 11 #include "ppapi/proxy/interface_proxy.h" |
12 | 12 |
13 struct PPB_CharSet_Dev; | 13 struct PPB_CharSet_Dev; |
14 struct PPB_Core; | 14 struct PPB_Core; |
15 | 15 |
16 namespace pp { | 16 namespace pp { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
19 class SerializedVarReturnValue; | 19 class SerializedVarReturnValue; |
20 | 20 |
21 class PPB_CharSet_Proxy : public InterfaceProxy { | 21 class PPB_CharSet_Proxy : public InterfaceProxy { |
22 public: | 22 public: |
23 PPB_CharSet_Proxy(Dispatcher* dispatcher, const void* target_interface); | 23 PPB_CharSet_Proxy(Dispatcher* dispatcher, const void* target_interface); |
24 virtual ~PPB_CharSet_Proxy(); | 24 virtual ~PPB_CharSet_Proxy(); |
25 | 25 |
| 26 static const Info* GetInfo(); |
| 27 |
26 const PPB_CharSet_Dev* ppb_char_set_target() const { | 28 const PPB_CharSet_Dev* ppb_char_set_target() const { |
27 return static_cast<const PPB_CharSet_Dev*>(target_interface()); | 29 return static_cast<const PPB_CharSet_Dev*>(target_interface()); |
28 } | 30 } |
29 | 31 |
30 // InterfaceProxy implementation. | 32 // InterfaceProxy implementation. |
31 virtual const void* GetSourceInterface() const; | |
32 virtual InterfaceID GetInterfaceId() const; | |
33 virtual bool OnMessageReceived(const IPC::Message& msg); | 33 virtual bool OnMessageReceived(const IPC::Message& msg); |
34 | 34 |
35 private: | 35 private: |
36 // Message handlers. | 36 // Message handlers. |
37 void OnMsgUTF16ToCharSet(PP_Instance instance, | 37 void OnMsgUTF16ToCharSet(PP_Instance instance, |
38 const string16& utf16, | 38 const string16& utf16, |
39 const std::string& char_set, | 39 const std::string& char_set, |
40 int32_t on_error, | 40 int32_t on_error, |
41 std::string* output, | 41 std::string* output, |
42 bool* output_is_success); | 42 bool* output_is_success); |
(...skipping 12 matching lines...) Expand all Loading... |
55 // Possibly NULL, lazily initialized by GetCoreInterface. | 55 // Possibly NULL, lazily initialized by GetCoreInterface. |
56 const PPB_Core* core_interface_; | 56 const PPB_Core* core_interface_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(PPB_CharSet_Proxy); | 58 DISALLOW_COPY_AND_ASSIGN(PPB_CharSet_Proxy); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace proxy | 61 } // namespace proxy |
62 } // namespace pp | 62 } // namespace pp |
63 | 63 |
64 #endif // PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ | 64 #endif // PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ |
OLD | NEW |