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 // Implements the untrusted side of the PPB_GetInterface method. | 5 // Implements the untrusted side of the PPB_GetInterface method. |
6 | 6 |
7 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" | 7 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_audio.h" | 10 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_audio.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_2d.h" | 21 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_2d.h" |
22 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" | 22 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" |
23 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" | 23 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" |
24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" | 24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" |
25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" | 25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" |
26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" | 26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" |
27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" | 27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" |
28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" | 28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" |
29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" | 29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" |
30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" | 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" |
| 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h" |
31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" | 32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" |
| 33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h" |
32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h" | 34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h" |
33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h" | 35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h" |
34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h" | 36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h" |
35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" | 37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" |
36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h" | 38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h" |
37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_zoom.h" | 39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_zoom.h" |
38 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppb_rpc.h" | 40 #include "native_client/src/shared/ppapi_proxy/untrusted/srpcgen/ppb_rpc.h" |
39 #include "native_client/src/shared/ppapi_proxy/utility.h" | 41 #include "native_client/src/shared/ppapi_proxy/utility.h" |
40 | 42 |
41 namespace ppapi_proxy { | 43 namespace ppapi_proxy { |
(...skipping 30 matching lines...) Expand all Loading... |
72 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, | 74 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, |
73 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, | 75 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, |
74 PluginInputEvent::GetMouseInterface1_0(), true }, | 76 PluginInputEvent::GetMouseInterface1_0(), true }, |
75 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, | 77 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, |
76 PluginInputEvent::GetMouseInterface1_1(), true }, | 78 PluginInputEvent::GetMouseInterface1_1(), true }, |
77 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true }, | 79 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true }, |
78 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), | 80 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), |
79 true }, | 81 true }, |
80 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, | 82 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, |
81 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, | 83 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, |
| 84 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), |
| 85 true }, |
82 { PPB_TESTING_DEV_INTERFACE_0_7, PluginTesting::GetInterface(), true }, | 86 { PPB_TESTING_DEV_INTERFACE_0_7, PluginTesting::GetInterface(), true }, |
83 { PPB_TESTING_DEV_INTERFACE_0_8, PluginTesting::GetInterface(), true }, | 87 { PPB_TESTING_DEV_INTERFACE_0_8, PluginTesting::GetInterface(), true }, |
| 88 { PPB_UDPSOCKET_PRIVATE_INTERFACE, PluginUDPSocketPrivate::GetInterface(), |
| 89 true }, |
84 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, | 90 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, |
85 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, | 91 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, |
86 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), | 92 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), |
87 true }, | 93 true }, |
88 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, | 94 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, |
89 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), | 95 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), |
90 true }, | 96 true }, |
91 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true }, | 97 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true }, |
92 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true }, | 98 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true }, |
93 }; | 99 }; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 interface_name, NaClSrpcErrorString(srpc_result)); | 133 interface_name, NaClSrpcErrorString(srpc_result)); |
128 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 134 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
129 interface_map[index].ppb_interface = NULL; | 135 interface_map[index].ppb_interface = NULL; |
130 ppb_interface = NULL; | 136 ppb_interface = NULL; |
131 } | 137 } |
132 interface_map[index].needs_browser_check = false; | 138 interface_map[index].needs_browser_check = false; |
133 return ppb_interface; | 139 return ppb_interface; |
134 } | 140 } |
135 | 141 |
136 } // namespace ppapi_proxy | 142 } // namespace ppapi_proxy |
OLD | NEW |