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" |
11 #include "ppapi/c/dev/ppb_console_dev.h" | 11 #include "ppapi/c/dev/ppb_console_dev.h" |
12 #include "ppapi/c/dev/ppb_crypto_dev.h" | 12 #include "ppapi/c/dev/ppb_crypto_dev.h" |
13 #include "ppapi/c/dev/ppb_cursor_control_dev.h" | 13 #include "ppapi/c/dev/ppb_cursor_control_dev.h" |
14 #include "ppapi/c/dev/ppb_device_ref_dev.h" | 14 #include "ppapi/c/dev/ppb_device_ref_dev.h" |
15 #include "ppapi/c/dev/ppb_font_dev.h" | 15 #include "ppapi/c/dev/ppb_font_dev.h" |
16 #include "ppapi/c/dev/ppb_fullscreen_dev.h" | 16 #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
17 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" | 17 #include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h" |
18 #include "ppapi/c/dev/ppb_ime_input_event_dev.h" | 18 #include "ppapi/c/dev/ppb_ime_input_event_dev.h" |
19 #include "ppapi/c/dev/ppb_memory_dev.h" | 19 #include "ppapi/c/dev/ppb_memory_dev.h" |
20 #include "ppapi/c/dev/ppb_message_loop_dev.h" | |
21 #include "ppapi/c/dev/ppb_resource_array_dev.h" | 20 #include "ppapi/c/dev/ppb_resource_array_dev.h" |
22 #include "ppapi/c/dev/ppb_testing_dev.h" | 21 #include "ppapi/c/dev/ppb_testing_dev.h" |
23 #include "ppapi/c/dev/ppb_text_input_dev.h" | 22 #include "ppapi/c/dev/ppb_text_input_dev.h" |
24 #include "ppapi/c/dev/ppb_url_util_dev.h" | 23 #include "ppapi/c/dev/ppb_url_util_dev.h" |
25 #include "ppapi/c/dev/ppb_var_deprecated.h" | 24 #include "ppapi/c/dev/ppb_var_deprecated.h" |
26 #include "ppapi/c/dev/ppb_video_capture_dev.h" | 25 #include "ppapi/c/dev/ppb_video_capture_dev.h" |
27 #include "ppapi/c/ppb_audio_config.h" | 26 #include "ppapi/c/ppb_audio_config.h" |
28 #include "ppapi/c/ppb_audio.h" | 27 #include "ppapi/c/ppb_audio.h" |
29 #include "ppapi/c/ppb_core.h" | 28 #include "ppapi/c/ppb_core.h" |
30 #include "ppapi/c/ppb_file_io.h" | 29 #include "ppapi/c/ppb_file_io.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "ppapi/proxy/ppb_flash_clipboard_proxy.h" | 73 #include "ppapi/proxy/ppb_flash_clipboard_proxy.h" |
75 #include "ppapi/proxy/ppb_flash_file_proxy.h" | 74 #include "ppapi/proxy/ppb_flash_file_proxy.h" |
76 #include "ppapi/proxy/ppb_flash_menu_proxy.h" | 75 #include "ppapi/proxy/ppb_flash_menu_proxy.h" |
77 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" | 76 #include "ppapi/proxy/ppb_flash_net_connector_proxy.h" |
78 #include "ppapi/proxy/ppb_flash_proxy.h" | 77 #include "ppapi/proxy/ppb_flash_proxy.h" |
79 #include "ppapi/proxy/ppb_font_proxy.h" | 78 #include "ppapi/proxy/ppb_font_proxy.h" |
80 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" | 79 #include "ppapi/proxy/ppb_graphics_2d_proxy.h" |
81 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" | 80 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" |
82 #include "ppapi/proxy/ppb_image_data_proxy.h" | 81 #include "ppapi/proxy/ppb_image_data_proxy.h" |
83 #include "ppapi/proxy/ppb_instance_proxy.h" | 82 #include "ppapi/proxy/ppb_instance_proxy.h" |
84 #include "ppapi/proxy/ppb_message_loop_proxy.h" | |
85 #include "ppapi/proxy/ppb_pdf_proxy.h" | 83 #include "ppapi/proxy/ppb_pdf_proxy.h" |
86 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" | 84 #include "ppapi/proxy/ppb_tcp_socket_private_proxy.h" |
87 #include "ppapi/proxy/ppb_testing_proxy.h" | 85 #include "ppapi/proxy/ppb_testing_proxy.h" |
88 #include "ppapi/proxy/ppb_text_input_proxy.h" | 86 #include "ppapi/proxy/ppb_text_input_proxy.h" |
89 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" | 87 #include "ppapi/proxy/ppb_udp_socket_private_proxy.h" |
90 #include "ppapi/proxy/ppb_url_loader_proxy.h" | 88 #include "ppapi/proxy/ppb_url_loader_proxy.h" |
91 #include "ppapi/proxy/ppb_url_response_info_proxy.h" | 89 #include "ppapi/proxy/ppb_url_response_info_proxy.h" |
92 #include "ppapi/proxy/ppb_var_deprecated_proxy.h" | 90 #include "ppapi/proxy/ppb_var_deprecated_proxy.h" |
93 #include "ppapi/proxy/ppb_video_capture_proxy.h" | 91 #include "ppapi/proxy/ppb_video_capture_proxy.h" |
94 #include "ppapi/proxy/ppb_video_decoder_proxy.h" | 92 #include "ppapi/proxy/ppb_video_decoder_proxy.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 #undef PROXIED_IFACE | 162 #undef PROXIED_IFACE |
165 | 163 |
166 // Manually add some special proxies. Some of these don't have interfaces | 164 // Manually add some special proxies. Some of these don't have interfaces |
167 // that they support, so aren't covered by the macros above, but have proxies | 165 // that they support, so aren't covered by the macros above, but have proxies |
168 // for message routing. Others have different implementations between the | 166 // for message routing. Others have different implementations between the |
169 // proxy and the impl and there's no obvious message routing. | 167 // proxy and the impl and there's no obvious message routing. |
170 AddProxy(API_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); | 168 AddProxy(API_ID_RESOURCE_CREATION, &ResourceCreationProxy::Create); |
171 AddProxy(API_ID_PPP_CLASS, &PPP_Class_Proxy::Create); | 169 AddProxy(API_ID_PPP_CLASS, &PPP_Class_Proxy::Create); |
172 AddPPB(PPB_CORE_INTERFACE_1_0, API_ID_PPB_CORE, | 170 AddPPB(PPB_CORE_INTERFACE_1_0, API_ID_PPB_CORE, |
173 PPB_Core_Proxy::GetPPB_Core_Interface()); | 171 PPB_Core_Proxy::GetPPB_Core_Interface()); |
174 AddPPB(PPB_MESSAGELOOP_DEV_INTERFACE_0_1, API_ID_NONE, | |
175 PPB_MessageLoop_Proxy::GetInterface()); | |
176 AddPPB(PPB_OPENGLES2_INTERFACE_1_0, API_ID_NONE, | 172 AddPPB(PPB_OPENGLES2_INTERFACE_1_0, API_ID_NONE, |
177 PPB_OpenGLES2_Shared::GetInterface()); | 173 PPB_OpenGLES2_Shared::GetInterface()); |
178 AddPPB(PPB_VAR_INTERFACE_1_1, API_ID_NONE, | 174 AddPPB(PPB_VAR_INTERFACE_1_1, API_ID_NONE, |
179 PPB_Var_Shared::GetVarInterface1_1()); | 175 PPB_Var_Shared::GetVarInterface1_1()); |
180 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, | 176 AddPPB(PPB_VAR_INTERFACE_1_0, API_ID_NONE, |
181 PPB_Var_Shared::GetVarInterface1_0()); | 177 PPB_Var_Shared::GetVarInterface1_0()); |
182 | 178 |
183 AddFlashInterfaces(); | 179 AddFlashInterfaces(); |
184 | 180 |
185 // PPB (browser) interfaces. | 181 // PPB (browser) interfaces. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 AddPPB(info->name, info->id, info->interface_ptr); | 330 AddPPB(info->name, info->id, info->interface_ptr); |
335 } | 331 } |
336 | 332 |
337 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { | 333 void InterfaceList::AddPPP(const InterfaceProxy::Info* info) { |
338 AddProxy(info->id, info->create_proxy); | 334 AddProxy(info->id, info->create_proxy); |
339 AddPPP(info->name, info->id, info->interface_ptr); | 335 AddPPP(info->name, info->id, info->interface_ptr); |
340 } | 336 } |
341 | 337 |
342 } // namespace proxy | 338 } // namespace proxy |
343 } // namespace ppapi | 339 } // namespace ppapi |
OLD | NEW |