| 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_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, | 87 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, |
| 88 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, | 88 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, |
| 89 PluginInputEvent::GetMouseInterface1_0(), true }, | 89 PluginInputEvent::GetMouseInterface1_0(), true }, |
| 90 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, | 90 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, |
| 91 PluginInputEvent::GetMouseInterface1_1(), true }, | 91 PluginInputEvent::GetMouseInterface1_1(), true }, |
| 92 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true }, | 92 { PPB_MOUSELOCK_INTERFACE, PluginMouseLock::GetInterface(), true }, |
| 93 { PPB_NETADDRESS_PRIVATE_INTERFACE_0_1, | 93 { PPB_NETADDRESS_PRIVATE_INTERFACE_0_1, |
| 94 PluginNetAddressPrivate::GetInterface0_1(), true }, | 94 PluginNetAddressPrivate::GetInterface0_1(), true }, |
| 95 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0, | 95 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_0, |
| 96 PluginNetAddressPrivate::GetInterface1_0(), true }, | 96 PluginNetAddressPrivate::GetInterface1_0(), true }, |
| 97 { PPB_NETADDRESS_PRIVATE_INTERFACE_1_1, |
| 98 PluginNetAddressPrivate::GetInterface1_1(), true }, |
| 97 { PPB_OPENGLES2_INTERFACE_1_0, PluginGraphics3D::GetOpenGLESInterface(), | 99 { PPB_OPENGLES2_INTERFACE_1_0, PluginGraphics3D::GetOpenGLESInterface(), |
| 98 true }, | 100 true }, |
| 99 { PPB_OPENGLES2_INSTANCEDARRAYS_DEV_INTERFACE_1_0, | 101 { PPB_OPENGLES2_INSTANCEDARRAYS_DEV_INTERFACE_1_0, |
| 100 PluginGraphics3D::GetOpenGLESInstancedArraysInterface(), | 102 PluginGraphics3D::GetOpenGLESInstancedArraysInterface(), |
| 101 true }, | 103 true }, |
| 102 { PPB_OPENGLES2_FRAMEBUFFERBLIT_DEV_INTERFACE_1_0, | 104 { PPB_OPENGLES2_FRAMEBUFFERBLIT_DEV_INTERFACE_1_0, |
| 103 PluginGraphics3D::GetOpenGLESFramebufferBlitInterface(), | 105 PluginGraphics3D::GetOpenGLESFramebufferBlitInterface(), |
| 104 true }, | 106 true }, |
| 105 { PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_DEV_INTERFACE_1_0, | 107 { PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_DEV_INTERFACE_1_0, |
| 106 PluginGraphics3D::GetOpenGLESFramebufferMultisampleInterface(), | 108 PluginGraphics3D::GetOpenGLESFramebufferMultisampleInterface(), |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 interface_name, NaClSrpcErrorString(srpc_result)); | 181 interface_name, NaClSrpcErrorString(srpc_result)); |
| 180 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 182 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
| 181 interface_map[index].ppb_interface = NULL; | 183 interface_map[index].ppb_interface = NULL; |
| 182 ppb_interface = NULL; | 184 ppb_interface = NULL; |
| 183 } | 185 } |
| 184 interface_map[index].needs_browser_check = false; | 186 interface_map[index].needs_browser_check = false; |
| 185 return ppb_interface; | 187 return ppb_interface; |
| 186 } | 188 } |
| 187 | 189 |
| 188 } // namespace ppapi_proxy | 190 } // namespace ppapi_proxy |
| OLD | NEW |