Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1218)

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc

Issue 9365016: Exposed Listen and Accept methods to Native Client. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync, deleted comments from SRPC file. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 12 matching lines...) Expand all
23 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" 23 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.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_lock.h" 29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h"
30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_net_address_private.h" 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_net_address_private.h"
31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h"
32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" 32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h"
33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_server_socket_priv ate.h"
33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h" 34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_socket_private.h"
34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h" 35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_testing.h"
35 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h" 36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_udp_socket_private.h"
36 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h" 37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_loader.h"
37 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h" 38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_request_info.h"
38 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h" 39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_url_response_info.h"
39 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h" 40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_var.h"
40 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_view.h" 41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_view.h"
41 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.h" 42 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_websocket.h"
42 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h" 43 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_widget.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 PluginInputEvent::GetMouseInterface1_1(), true }, 88 PluginInputEvent::GetMouseInterface1_1(), true },
88 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true }, 89 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true },
89 { PPB_NETADDRESS_PRIVATE_INTERFACE_0_1, 90 { PPB_NETADDRESS_PRIVATE_INTERFACE_0_1,
90 PluginNetAddressPrivate::GetInterface0_1(), true }, 91 PluginNetAddressPrivate::GetInterface0_1(), true },
91 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0, 92 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0,
92 PluginNetAddressPrivate::GetInterface1_0(), true }, 93 PluginNetAddressPrivate::GetInterface1_0(), true },
93 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), 94 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(),
94 true }, 95 true },
95 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, 96 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true },
96 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, 97 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true },
98 { PPB_TCPSERVERSOCKET_PRIVATE_INTERFACE,
99 PluginTCPServerSocketPrivate::GetInterface(),
100 true },
97 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), 101 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(),
98 true }, 102 true },
99 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, 103 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true },
100 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, 104 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true },
101 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, 105 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2,
102 PluginUDPSocketPrivate::GetInterface0_2(), true }, 106 PluginUDPSocketPrivate::GetInterface0_2(), true },
103 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3, 107 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3,
104 PluginUDPSocketPrivate::GetInterface0_3(), true }, 108 PluginUDPSocketPrivate::GetInterface0_3(), true },
105 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, 109 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true },
106 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, 110 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true },
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 interface_name, NaClSrpcErrorString(srpc_result)); 158 interface_name, NaClSrpcErrorString(srpc_result));
155 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { 159 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) {
156 interface_map[index].ppb_interface = NULL; 160 interface_map[index].ppb_interface = NULL;
157 ppb_interface = NULL; 161 ppb_interface = NULL;
158 } 162 }
159 interface_map[index].needs_browser_check = false; 163 interface_map[index].needs_browser_check = false;
160 return ppb_interface; 164 return ppb_interface;
161 } 165 }
162 166
163 } // namespace ppapi_proxy 167 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698