| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_4, | 130 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_4, |
| 131 PluginTCPSocketPrivate::GetInterface0_4(), true }, | 131 PluginTCPSocketPrivate::GetInterface0_4(), true }, |
| 132 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_3, | 132 { PPB_TCPSOCKET_PRIVATE_INTERFACE_0_3, |
| 133 PluginTCPSocketPrivate::GetInterface0_3(), true }, | 133 PluginTCPSocketPrivate::GetInterface0_3(), true }, |
| 134 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, | 134 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, |
| 135 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, | 135 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, |
| 136 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, | 136 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, |
| 137 PluginUDPSocketPrivate::GetInterface0_2(), true }, | 137 PluginUDPSocketPrivate::GetInterface0_2(), true }, |
| 138 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3, | 138 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3, |
| 139 PluginUDPSocketPrivate::GetInterface0_3(), true }, | 139 PluginUDPSocketPrivate::GetInterface0_3(), true }, |
| 140 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_4, |
| 141 PluginUDPSocketPrivate::GetInterface0_4(), true }, |
| 140 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, | 142 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, |
| 141 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, | 143 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, |
| 142 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), | 144 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), |
| 143 true }, | 145 true }, |
| 144 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), | 146 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), |
| 145 true }, | 147 true }, |
| 146 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, | 148 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, |
| 147 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, | 149 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, |
| 148 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, | 150 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, |
| 149 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(), | 151 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(), |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 interface_name, NaClSrpcErrorString(srpc_result)); | 191 interface_name, NaClSrpcErrorString(srpc_result)); |
| 190 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 192 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
| 191 interface_map[index].ppb_interface = NULL; | 193 interface_map[index].ppb_interface = NULL; |
| 192 ppb_interface = NULL; | 194 ppb_interface = NULL; |
| 193 } | 195 } |
| 194 interface_map[index].needs_browser_check = false; | 196 interface_map[index].needs_browser_check = false; |
| 195 return ppb_interface; | 197 return ppb_interface; |
| 196 } | 198 } |
| 197 | 199 |
| 198 } // namespace ppapi_proxy | 200 } // namespace ppapi_proxy |
| OLD | NEW |