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_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), | 85 { PPB_TCPSOCKET_PRIVATE_INTERFACE, PluginTCPSocketPrivate::GetInterface(), |
86 true }, | 86 true }, |
87 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, | 87 { PPB_TESTING_DEV_INTERFACE_0_9, PluginTesting::GetInterface(), true }, |
88 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, | 88 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, |
89 { PPB_UDPSOCKET_PRIVATE_INTERFACE, PluginUDPSocketPrivate::GetInterface(), | 89 { PPB_UDPSOCKET_PRIVATE_INTERFACE, PluginUDPSocketPrivate::GetInterface(), |
90 true }, | 90 true }, |
91 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, | 91 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, |
92 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, | 92 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, |
93 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), | 93 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), |
94 true }, | 94 true }, |
95 { PPB_VAR_ARRAY_BUFFER_DEV_INTERFACE, PluginVar::GetArrayBufferInterface(), | 95 { PPB_VAR_ARRAY_BUFFER_INTERFACE, PluginVar::GetArrayBufferInterface(), |
96 true }, | 96 true }, |
97 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, | 97 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, |
98 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, | 98 { PPB_VAR_INTERFACE_1_0, PluginVar::GetInterface1_0(), true }, |
99 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, | 99 { PPB_VIEW_INTERFACE, PluginView::GetInterface(), true }, |
100 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), | 100 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), |
101 true }, | 101 true }, |
102 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true }, | 102 { PPB_WIDGET_DEV_INTERFACE, PluginWidget::GetInterface(), true }, |
103 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true }, | 103 { PPB_ZOOM_DEV_INTERFACE, PluginZoom::GetInterface(), true }, |
104 }; | 104 }; |
105 | 105 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 interface_name, NaClSrpcErrorString(srpc_result)); | 138 interface_name, NaClSrpcErrorString(srpc_result)); |
139 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 139 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
140 interface_map[index].ppb_interface = NULL; | 140 interface_map[index].ppb_interface = NULL; |
141 ppb_interface = NULL; | 141 ppb_interface = NULL; |
142 } | 142 } |
143 interface_map[index].needs_browser_check = false; | 143 interface_map[index].needs_browser_check = false; |
144 return ppb_interface; | 144 return ppb_interface; |
145 } | 145 } |
146 | 146 |
147 } // namespace ppapi_proxy | 147 } // namespace ppapi_proxy |
OLD | NEW |