| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 { PPB_CORE_INTERFACE, PluginCore::GetInterface(), true }, | 54 { PPB_CORE_INTERFACE, PluginCore::GetInterface(), true }, |
| 55 { PPB_CURSOR_CONTROL_DEV_INTERFACE, PluginCursorControl::GetInterface(), | 55 { PPB_CURSOR_CONTROL_DEV_INTERFACE, PluginCursorControl::GetInterface(), |
| 56 true }, | 56 true }, |
| 57 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, | 57 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, |
| 58 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, | 58 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, |
| 59 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, | 59 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, |
| 60 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, | 60 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, |
| 61 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, | 61 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, |
| 62 { PPB_FULLSCREEN_DEV_INTERFACE, PluginFullscreen::GetInterface(), true }, | 62 { PPB_FULLSCREEN_DEV_INTERFACE, PluginFullscreen::GetInterface(), true }, |
| 63 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, | 63 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, |
| 64 { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, | 64 { PPB_GRAPHICS_3D_DEV_INTERFACE, PluginGraphics3D::GetInterface(), true }, |
| 65 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, | 65 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, |
| 66 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, | 66 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, |
| 67 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, | 67 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, |
| 68 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, | 68 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, |
| 69 PluginInputEvent::GetKeyboardInterface(), true }, | 69 PluginInputEvent::GetKeyboardInterface(), true }, |
| 70 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, | 70 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, |
| 71 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, | 71 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, |
| 72 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, | 72 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, |
| 73 PluginInputEvent::GetMouseInterface1_0(), true }, | 73 PluginInputEvent::GetMouseInterface1_0(), true }, |
| 74 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, | 74 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, |
| 75 PluginInputEvent::GetMouseInterface1_1(), true }, | 75 PluginInputEvent::GetMouseInterface1_1(), true }, |
| 76 { PPB_OPENGLES2_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), | 76 { PPB_OPENGLES2_DEV_INTERFACE, PluginGraphics3D::GetOpenGLESInterface(), |
| 77 true }, | 77 true }, |
| 78 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, | 78 { PPB_PDF_INTERFACE, PluginPDF::GetInterface(), true }, |
| 79 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, | 79 { PPB_SCROLLBAR_DEV_INTERFACE, PluginScrollbar::GetInterface(), true }, |
| 80 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, | 80 { PPB_TESTING_DEV_INTERFACE, PluginTesting::GetInterface(), true }, |
| 81 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, | 81 { PPB_URLLOADER_INTERFACE, PluginURLLoader::GetInterface(), true }, |
| 82 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, | 82 { PPB_URLREQUESTINFO_INTERFACE, PluginURLRequestInfo::GetInterface(), true }, |
| 83 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), | 83 { PPB_URLRESPONSEINFO_INTERFACE, PluginURLResponseInfo::GetInterface(), |
| 84 true }, | 84 true }, |
| 85 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, | 85 { PPB_VAR_INTERFACE, PluginVar::GetInterface(), true }, |
| 86 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), | 86 { PPB_WHEEL_INPUT_EVENT_INTERFACE, PluginInputEvent::GetWheelInterface(), |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 interface_name, NaClSrpcErrorString(srpc_result)); | 124 interface_name, NaClSrpcErrorString(srpc_result)); |
| 125 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 125 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
| 126 interface_map[index].ppb_interface = NULL; | 126 interface_map[index].ppb_interface = NULL; |
| 127 ppb_interface = NULL; | 127 ppb_interface = NULL; |
| 128 } | 128 } |
| 129 interface_map[index].needs_browser_check = false; | 129 interface_map[index].needs_browser_check = false; |
| 130 return ppb_interface; | 130 return ppb_interface; |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace ppapi_proxy | 133 } // namespace ppapi_proxy |
| OLD | NEW |