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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 { PPB_NETADDRESS_PRIVATE_INTERFACE, PluginNetAddressPrivate::GetInterface(), | 85 { PPB_NETADDRESS_PRIVATE_INTERFACE, PluginNetAddressPrivate::GetInterface(), |
86 true }, | 86 true }, |
87 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), | 87 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), |
88 true }, | 88 true }, |
89 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, | 89 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, |
90 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, | 90 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, |
91 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), | 91 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), |
92 true }, | 92 true }, |
93 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, | 93 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, |
94 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, | 94 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, |
95 { PPB_UDPSOCKET_PRIVATE_INTERFACE, PluginUDPSocketPrivate::GetInterface(), | 95 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_2, |
96 true }, | 96 PluginUDPSocketPrivate::GetInterface_0_2(), true }, |
yzshen1
2012/02/07 18:14:59
Please be consistent: GetInterface0_2. (And also l
mtilburg1
2012/02/07 22:08:14
Done.
| |
97 { PPB_UDPSOCKET_PRIVATE_INTERFACE_0_3, | |
98 PluginUDPSocketPrivate::GetInterface_0_3(), true }, | |
97 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, | 99 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, |
98 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, | 100 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, |
99 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), | 101 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), |
100 true }, | 102 true }, |
101 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), | 103 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), |
102 true }, | 104 true }, |
103 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, | 105 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, |
104 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, | 106 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, |
105 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, | 107 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, |
106 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(), | 108 { PPB_WEBSOCKET_INTERFACE, PluginWebSocket::GetInterface(), |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 interface_name, NaClSrpcErrorString(srpc_result)); | 148 interface_name, NaClSrpcErrorString(srpc_result)); |
147 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 149 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
148 interface_map[index].ppb_interface = NULL; | 150 interface_map[index].ppb_interface = NULL; |
149 ppb_interface = NULL; | 151 ppb_interface = NULL; |
150 } | 152 } |
151 interface_map[index].needs_browser_check = false; | 153 interface_map[index].needs_browser_check = false; |
152 return ppb_interface; | 154 return ppb_interface; |
153 } | 155 } |
154 | 156 |
155 } // namespace ppapi_proxy | 157 } // namespace ppapi_proxy |
OLD | NEW |