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 // 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 11 matching lines...) Expand all Loading... |
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_host_resolver_private.
h" | 23 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_host_resolver_private.
h" |
24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" | 24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" |
25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" | 25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" |
26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" | 26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" |
27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" | 27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" |
28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" | 28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" |
29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_cursor.h" | 29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_cursor.h" |
30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" | 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" |
31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_net_address_private.h" | 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_net_address_private.h" |
| 32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_network_list_private.h
" |
| 33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_network_monitor_privat
e.h" |
32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" | 34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" |
33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" | 35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" |
34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_server_socket_priv
ate.h" | 36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_server_socket_priv
ate.h" |
35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h" | 37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h" |
36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" | 38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" |
37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h" | 39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h" |
38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h" | 40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h" |
39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h" | 41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h" |
40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h" | 42 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h" |
41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" | 43 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 PluginInputEvent::GetMouseInterface1_0(), true }, | 91 PluginInputEvent::GetMouseInterface1_0(), true }, |
90 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, | 92 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, |
91 PluginInputEvent::GetMouseInterface1_1(), true }, | 93 PluginInputEvent::GetMouseInterface1_1(), true }, |
92 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true }, | 94 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true }, |
93 { PPB_NETADDRESS_PRIVATE_INTERFACE_0_1, | 95 { PPB_NETADDRESS_PRIVATE_INTERFACE_0_1, |
94 PluginNetAddressPrivate::GetInterface0_1(), true }, | 96 PluginNetAddressPrivate::GetInterface0_1(), true }, |
95 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0, | 97 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0, |
96 PluginNetAddressPrivate::GetInterface1_0(), true }, | 98 PluginNetAddressPrivate::GetInterface1_0(), true }, |
97 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_1, | 99 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_1, |
98 PluginNetAddressPrivate::GetInterface1_1(), true }, | 100 PluginNetAddressPrivate::GetInterface1_1(), true }, |
| 101 { PPB_NETWORKLIST_PRIVATE_INTERFACE, PluginNetworkListPrivate::GetInterface(), |
| 102 true }, |
| 103 { PPB_NETWORKMONITOR_PRIVATE_INTERFACE, |
| 104 PluginNetworkMonitorPrivate::GetInterface(), true }, |
99 { PPB_OPENGLES2_INTERFACE_1_0, PluginGraphics3D::GetOpenGLESInterface(), | 105 { PPB_OPENGLES2_INTERFACE_1_0, PluginGraphics3D::GetOpenGLESInterface(), |
100 true }, | 106 true }, |
101 { PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0, | 107 { PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0, |
102 PluginGraphics3D::GetOpenGLESInstancedArraysInterface(), | 108 PluginGraphics3D::GetOpenGLESInstancedArraysInterface(), |
103 true }, | 109 true }, |
104 { PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0, | 110 { PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0, |
105 PluginGraphics3D::GetOpenGLESFramebufferBlitInterface(), | 111 PluginGraphics3D::GetOpenGLESFramebufferBlitInterface(), |
106 true }, | 112 true }, |
107 { PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0, | 113 { PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0, |
108 PluginGraphics3D::GetOpenGLESFramebufferMultisampleInterface(), | 114 PluginGraphics3D::GetOpenGLESFramebufferMultisampleInterface(), |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 interface_name, NaClSrpcErrorString(srpc_result)); | 189 interface_name, NaClSrpcErrorString(srpc_result)); |
184 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 190 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
185 interface_map[index].ppb_interface = NULL; | 191 interface_map[index].ppb_interface = NULL; |
186 ppb_interface = NULL; | 192 ppb_interface = NULL; |
187 } | 193 } |
188 interface_map[index].needs_browser_check = false; | 194 interface_map[index].needs_browser_check = false; |
189 return ppb_interface; | 195 return ppb_interface; |
190 } | 196 } |
191 | 197 |
192 } // namespace ppapi_proxy | 198 } // namespace ppapi_proxy |
OLD | NEW |