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_PROXY_PPB_FONT_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_FONT_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_FONT_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_FONT_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/host_resource.h" | 11 #include "ppapi/proxy/host_resource.h" |
12 #include "ppapi/proxy/interface_proxy.h" | 12 #include "ppapi/proxy/interface_proxy.h" |
13 | 13 |
14 struct PPB_Font_Dev; | 14 struct PPB_Font_Dev; |
15 | 15 |
16 namespace pp { | 16 namespace pp { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
19 struct PPBFont_DrawTextAt_Params; | 19 struct PPBFont_DrawTextAt_Params; |
20 struct SerializedFontDescription; | 20 struct SerializedFontDescription; |
21 class SerializedVarReceiveInput; | 21 class SerializedVarReceiveInput; |
22 | 22 |
23 class PPB_Font_Proxy : public InterfaceProxy { | 23 class PPB_Font_Proxy : public InterfaceProxy { |
24 public: | 24 public: |
25 PPB_Font_Proxy(Dispatcher* dispatcher, const void* target_interface); | 25 PPB_Font_Proxy(Dispatcher* dispatcher, const void* target_interface); |
26 virtual ~PPB_Font_Proxy(); | 26 virtual ~PPB_Font_Proxy(); |
27 | 27 |
| 28 static const Info* GetInfo(); |
| 29 |
28 const PPB_Font_Dev* ppb_font_target() const { | 30 const PPB_Font_Dev* ppb_font_target() const { |
29 return static_cast<const PPB_Font_Dev*>(target_interface()); | 31 return static_cast<const PPB_Font_Dev*>(target_interface()); |
30 } | 32 } |
31 | 33 |
32 // InterfaceProxy implementation. | 34 // InterfaceProxy implementation. |
33 virtual const void* GetSourceInterface() const; | |
34 virtual InterfaceID GetInterfaceId() const; | |
35 virtual bool OnMessageReceived(const IPC::Message& msg); | 35 virtual bool OnMessageReceived(const IPC::Message& msg); |
36 | 36 |
37 private: | 37 private: |
38 // Message handlers. | 38 // Message handlers. |
39 void OnMsgCreate(PP_Instance instance, | 39 void OnMsgCreate(PP_Instance instance, |
40 const SerializedFontDescription& in_description, | 40 const SerializedFontDescription& in_description, |
41 HostResource* result, | 41 HostResource* result, |
42 SerializedFontDescription* out_description, | 42 SerializedFontDescription* out_description, |
43 std::string* out_metrics); | 43 std::string* out_metrics); |
44 void OnMsgDrawTextAt(SerializedVarReceiveInput text, | 44 void OnMsgDrawTextAt(SerializedVarReceiveInput text, |
(...skipping 17 matching lines...) Expand all Loading... |
62 uint32_t char_offset, | 62 uint32_t char_offset, |
63 int32_t* result); | 63 int32_t* result); |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(PPB_Font_Proxy); | 65 DISALLOW_COPY_AND_ASSIGN(PPB_Font_Proxy); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace proxy | 68 } // namespace proxy |
69 } // namespace pp | 69 } // namespace pp |
70 | 70 |
71 #endif // PPAPI_PROXY_PPB_FONT_PROXY_H_ | 71 #endif // PPAPI_PROXY_PPB_FONT_PROXY_H_ |
OLD | NEW |