OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "ppapi/proxy/interface_list.h" | 5 #include "ppapi/proxy/interface_list.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "ppapi/c/dev/ppb_audio_input_dev.h" | 8 #include "ppapi/c/dev/ppb_audio_input_dev.h" |
9 #include "ppapi/c/dev/ppb_buffer_dev.h" | 9 #include "ppapi/c/dev/ppb_buffer_dev.h" |
10 #include "ppapi/c/dev/ppb_char_set_dev.h" | 10 #include "ppapi/c/dev/ppb_char_set_dev.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 101 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
102 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 102 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
103 #include "ppapi/proxy/ppp_class_proxy.h" | 103 #include "ppapi/proxy/ppp_class_proxy.h" |
104 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" | 104 #include "ppapi/proxy/ppp_graphics_3d_proxy.h" |
105 #include "ppapi/proxy/ppp_input_event_proxy.h" | 105 #include "ppapi/proxy/ppp_input_event_proxy.h" |
106 #include "ppapi/proxy/ppp_instance_private_proxy.h" | 106 #include "ppapi/proxy/ppp_instance_private_proxy.h" |
107 #include "ppapi/proxy/ppp_instance_proxy.h" | 107 #include "ppapi/proxy/ppp_instance_proxy.h" |
108 #include "ppapi/proxy/ppp_messaging_proxy.h" | 108 #include "ppapi/proxy/ppp_messaging_proxy.h" |
109 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" | 109 #include "ppapi/proxy/ppp_mouse_lock_proxy.h" |
110 #include "ppapi/proxy/ppp_printing_proxy.h" | 110 #include "ppapi/proxy/ppp_printing_proxy.h" |
| 111 #include "ppapi/proxy/ppp_text_input_proxy.h" |
111 #include "ppapi/proxy/ppp_video_decoder_proxy.h" | 112 #include "ppapi/proxy/ppp_video_decoder_proxy.h" |
112 #include "ppapi/proxy/resource_creation_proxy.h" | 113 #include "ppapi/proxy/resource_creation_proxy.h" |
113 #include "ppapi/shared_impl/ppb_opengles2_shared.h" | 114 #include "ppapi/shared_impl/ppb_opengles2_shared.h" |
114 #include "ppapi/shared_impl/ppb_var_shared.h" | 115 #include "ppapi/shared_impl/ppb_var_shared.h" |
115 #include "ppapi/thunk/thunk.h" | 116 #include "ppapi/thunk/thunk.h" |
116 | 117 |
117 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. | 118 // Helper to get the proxy name PPB_Foo_Proxy given the API name PPB_Foo. |
118 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy | 119 #define PROXY_CLASS_NAME(api_name) api_name##_Proxy |
119 | 120 |
120 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API | 121 // Helper to get the interface ID PPB_Foo_Proxy::kApiID given the API |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo()); | 215 AddPPB(PPB_Var_Deprecated_Proxy::GetInfo()); |
215 | 216 |
216 // PPP (plugin) interfaces. | 217 // PPP (plugin) interfaces. |
217 // TODO(brettw) move these to interface_list*.h | 218 // TODO(brettw) move these to interface_list*.h |
218 AddProxy(API_ID_PPP_INSTANCE, &ProxyFactory<PPP_Instance_Proxy>); | 219 AddProxy(API_ID_PPP_INSTANCE, &ProxyFactory<PPP_Instance_Proxy>); |
219 AddPPP(PPP_INSTANCE_INTERFACE_1_1, API_ID_PPP_INSTANCE, | 220 AddPPP(PPP_INSTANCE_INTERFACE_1_1, API_ID_PPP_INSTANCE, |
220 PPP_Instance_Proxy::GetInstanceInterface()); | 221 PPP_Instance_Proxy::GetInstanceInterface()); |
221 AddProxy(API_ID_PPP_PRINTING, &ProxyFactory<PPP_Printing_Proxy>); | 222 AddProxy(API_ID_PPP_PRINTING, &ProxyFactory<PPP_Printing_Proxy>); |
222 AddPPP(PPP_PRINTING_DEV_INTERFACE, API_ID_PPP_PRINTING, | 223 AddPPP(PPP_PRINTING_DEV_INTERFACE, API_ID_PPP_PRINTING, |
223 PPP_Printing_Proxy::GetProxyInterface()); | 224 PPP_Printing_Proxy::GetProxyInterface()); |
| 225 AddProxy(API_ID_PPP_TEXT_INPUT, &ProxyFactory<PPP_TextInput_Proxy>); |
| 226 AddPPP(PPP_TEXTINPUT_DEV_INTERFACE, API_ID_PPP_TEXT_INPUT, |
| 227 PPP_TextInput_Proxy::GetProxyInterface()); |
224 | 228 |
225 // Old-style GetInfo PPP interfaces. | 229 // Old-style GetInfo PPP interfaces. |
226 // Do not add more stuff here, they should be added to interface_list*.h | 230 // Do not add more stuff here, they should be added to interface_list*.h |
227 // TODO(brettw) remove these. | 231 // TODO(brettw) remove these. |
228 AddPPP(PPP_Graphics3D_Proxy::GetInfo()); | 232 AddPPP(PPP_Graphics3D_Proxy::GetInfo()); |
229 AddPPP(PPP_InputEvent_Proxy::GetInfo()); | 233 AddPPP(PPP_InputEvent_Proxy::GetInfo()); |
230 AddPPP(PPP_Instance_Private_Proxy::GetInfo()); | 234 AddPPP(PPP_Instance_Private_Proxy::GetInfo()); |
231 AddPPP(PPP_Messaging_Proxy::GetInfo()); | 235 AddPPP(PPP_Messaging_Proxy::GetInfo()); |
232 AddPPP(PPP_MouseLock_Proxy::GetInfo()); | 236 AddPPP(PPP_MouseLock_Proxy::GetInfo()); |
233 AddPPP(PPP_VideoCapture_Proxy::GetInfo()); | 237 AddPPP(PPP_VideoCapture_Proxy::GetInfo()); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 AddPPB(info->name, info->id, info->interface_ptr); | 373 AddPPB(info->name, info->id, info->interface_ptr); |
370 } | 374 } |
371 | 375 |
372 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { | 376 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { |
373 AddProxy(info->id, info->create_proxy); | 377 AddProxy(info->id, info->create_proxy); |
374 AddPPP(info->name, info->id, info->interface_ptr); | 378 AddPPP(info->name, info->id, info->interface_ptr); |
375 } | 379 } |
376 | 380 |
377 } // namespace proxy | 381 } // namespace proxy |
378 } // namespace ppapi | 382 } // namespace ppapi |
OLD | NEW |