Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: ppapi/proxy/ppb_char_set_proxy.h

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppb_buffer_proxy.cc ('k') | ppapi/proxy/ppb_char_set_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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"
11 #include "ppapi/shared_impl/function_group_base.h" 11 #include "ppapi/shared_impl/function_group_base.h"
12 #include "ppapi/thunk/ppb_char_set_api.h" 12 #include "ppapi/thunk/ppb_char_set_api.h"
13 13
14 struct PPB_CharSet_Dev; 14 struct PPB_CharSet_Dev;
15 struct PPB_Core; 15 struct PPB_Core;
16 16
17 namespace ppapi { 17 namespace ppapi {
18 namespace proxy { 18 namespace proxy {
19 19
20 class SerializedVarReturnValue; 20 class SerializedVarReturnValue;
21 21
22 class PPB_CharSet_Proxy : public ppapi::FunctionGroupBase, 22 class PPB_CharSet_Proxy : public InterfaceProxy,
23 public ppapi::thunk::PPB_CharSet_FunctionAPI, 23 public ppapi::thunk::PPB_CharSet_FunctionAPI {
24 public InterfaceProxy {
25 public: 24 public:
26 PPB_CharSet_Proxy(Dispatcher* dispatcher, const void* target_interface); 25 PPB_CharSet_Proxy(Dispatcher* dispatcher);
27 virtual ~PPB_CharSet_Proxy(); 26 virtual ~PPB_CharSet_Proxy();
28 27
29 static const Info* GetInfo();
30
31 // FunctionGroupBase overrides. 28 // FunctionGroupBase overrides.
32 virtual ppapi::thunk::PPB_CharSet_FunctionAPI* AsPPB_CharSet_FunctionAPI() 29 virtual ppapi::thunk::PPB_CharSet_FunctionAPI* AsPPB_CharSet_FunctionAPI()
33 OVERRIDE; 30 OVERRIDE;
34 31
35 // PPB_CharSet_FunctionAPI implementation. 32 // PPB_CharSet_FunctionAPI implementation.
36 virtual char* UTF16ToCharSet(PP_Instance instance, 33 virtual char* UTF16ToCharSet(PP_Instance instance,
37 const uint16_t* utf16, uint32_t utf16_len, 34 const uint16_t* utf16, uint32_t utf16_len,
38 const char* output_char_set, 35 const char* output_char_set,
39 PP_CharSet_ConversionError on_error, 36 PP_CharSet_ConversionError on_error,
40 uint32_t* output_length) OVERRIDE; 37 uint32_t* output_length) OVERRIDE;
41 virtual uint16_t* CharSetToUTF16(PP_Instance instance, 38 virtual uint16_t* CharSetToUTF16(PP_Instance instance,
42 const char* input, uint32_t input_len, 39 const char* input, uint32_t input_len,
43 const char* input_char_set, 40 const char* input_char_set,
44 PP_CharSet_ConversionError on_error, 41 PP_CharSet_ConversionError on_error,
45 uint32_t* output_length) OVERRIDE; 42 uint32_t* output_length) OVERRIDE;
46 virtual PP_Var GetDefaultCharSet(PP_Instance instance) OVERRIDE; 43 virtual PP_Var GetDefaultCharSet(PP_Instance instance) OVERRIDE;
47 44
48 // InterfaceProxy implementation. 45 // InterfaceProxy implementation.
49 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 46 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
50 47
48 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_CHAR_SET;
49
51 private: 50 private:
52 void OnMsgGetDefaultCharSet(PP_Instance instance, 51 void OnMsgGetDefaultCharSet(PP_Instance instance,
53 SerializedVarReturnValue result); 52 SerializedVarReturnValue result);
54 53
55 DISALLOW_COPY_AND_ASSIGN(PPB_CharSet_Proxy); 54 DISALLOW_COPY_AND_ASSIGN(PPB_CharSet_Proxy);
56 }; 55 };
57 56
58 } // namespace proxy 57 } // namespace proxy
59 } // namespace ppapi 58 } // namespace ppapi
60 59
61 #endif // PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_ 60 #endif // PPAPI_PROXY_PPB_CHAR_SET_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_buffer_proxy.cc ('k') | ppapi/proxy/ppb_char_set_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698