| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0, | 87 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0, |
| 88 PluginNetAddressPrivate::GetInterface1_0(), true }, | 88 PluginNetAddressPrivate::GetInterface1_0(), true }, |
| 89 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), | 89 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), |
| 90 true }, | 90 true }, |
| 91 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, | 91 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, |
| 92 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, | 92 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, |
| 93 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), | 93 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), |
| 94 true }, | 94 true }, |
| 95 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, | 95 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, |
| 96 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, | 96 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, |
| 97 { PPB_UDPSOCKET_PRIVATE_INTERFACE, PluginUDPSocketPrivate::GetInterface(), | 97 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, |
| 98 true }, | 98 PluginUDPSocketPrivate::GetInterface0_2(), true }, |
| 99 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3, |
| 100 PluginUDPSocketPrivate::GetInterface0_3(), true }, |
| 99 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, | 101 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, |
| 100 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, | 102 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, |
| 101 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), | 103 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), |
| 102 true }, | 104 true }, |
| 103 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), | 105 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), |
| 104 true }, | 106 true }, |
| 105 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, | 107 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, |
| 106 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, | 108 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, |
| 107 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, | 109 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, |
| 108 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(), | 110 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(), |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 interface_name, NaClSrpcErrorString(srpc_result)); | 150 interface_name, NaClSrpcErrorString(srpc_result)); |
| 149 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 151 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
| 150 interface_map[index].ppb_interface = NULL; | 152 interface_map[index].ppb_interface = NULL; |
| 151 ppb_interface = NULL; | 153 ppb_interface = NULL; |
| 152 } | 154 } |
| 153 interface_map[index].needs_browser_check = false; | 155 interface_map[index].needs_browser_check = false; |
| 154 return ppb_interface; | 156 return ppb_interface; |
| 155 } | 157 } |
| 156 | 158 |
| 157 } // namespace ppapi_proxy | 159 } // namespace ppapi_proxy |
| OLD | NEW |