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

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

Issue 10735056: AllowBroadcast() is exposed to NaCl. (Closed) Base URL: http://git.chromium.org/chromium/src.git@udp_broadcast
Patch Set: Fixed comments. Created 8 years, 4 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_4, 124 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_4,
125 PluginTCPSocketPrivate::GetInterface0_4(), true }, 125 PluginTCPSocketPrivate::GetInterface0_4(), true },
126 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_3, 126 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_3,
127 PluginTCPSocketPrivate::GetInterface0_3(), true }, 127 PluginTCPSocketPrivate::GetInterface0_3(), true },
128 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, 128 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true },
129 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, 129 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true },
130 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, 130 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2,
131 PluginUDPSocketPrivate::GetInterface0_2(), true }, 131 PluginUDPSocketPrivate::GetInterface0_2(), true },
132 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3, 132 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3,
133 PluginUDPSocketPrivate::GetInterface0_3(), true }, 133 PluginUDPSocketPrivate::GetInterface0_3(), true },
134 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_4,
135 PluginUDPSocketPrivate::GetInterface0_4(), true },
134 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, 136 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true },
135 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, 137 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true },
136 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), 138 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(),
137 true }, 139 true },
138 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), 140 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(),
139 true }, 141 true },
140 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, 142 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true },
141 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, 143 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true },
142 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, 144 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true },
143 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(), 145 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(),
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 interface_name, NaClSrpcErrorString(srpc_result)); 185 interface_name, NaClSrpcErrorString(srpc_result));
184 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { 186 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) {
185 interface_map[index].ppb_interface = NULL; 187 interface_map[index].ppb_interface = NULL;
186 ppb_interface = NULL; 188 ppb_interface = NULL;
187 } 189 }
188 interface_map[index].needs_browser_check = false; 190 interface_map[index].needs_browser_check = false;
189 return ppb_interface; 191 return ppb_interface;
190 } 192 }
191 193
192 } // namespace ppapi_proxy 194 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698