| 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" |
| 11 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_audio_config.h" | 11 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_audio_config.h" |
| 12 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_buffer.h" | 12 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_buffer.h" |
| 13 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_core.h" | 13 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_core.h" |
| 14 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_cursor_control.h" | 14 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_cursor_control.h" |
| 15 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.h" | 15 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_file_io.h" |
| 16 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_file_ref.h" | 16 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_file_ref.h" |
| 17 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_file_system.h" | 17 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_file_system.h" |
| 18 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_find.h" | 18 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_find.h" |
| 19 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_font.h" | 19 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_font.h" |
| 20 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_fullscreen.h" | 20 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_fullscreen.h" |
| 21 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_gamepad.h" |
| 21 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_2d.h" | 22 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_2d.h" |
| 22 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" | 23 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" |
| 23 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" | 24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" |
| 24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" | 25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" |
| 25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" | 26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" |
| 26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" | 27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" |
| 27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" | 28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" |
| 28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" | 29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" |
| 29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" | 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" |
| 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" | 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 57 { PPB_AUDIO_CONFIG_INTERFACE, PluginAudioConfig::GetInterface(), true }, | 58 { PPB_AUDIO_CONFIG_INTERFACE, PluginAudioConfig::GetInterface(), true }, |
| 58 { PPB_CORE_INTERFACE, PluginCore::GetInterface(), true }, | 59 { PPB_CORE_INTERFACE, PluginCore::GetInterface(), true }, |
| 59 { PPB_CURSOR_CONTROL_DEV_INTERFACE, PluginCursorControl::GetInterface(), | 60 { PPB_CURSOR_CONTROL_DEV_INTERFACE, PluginCursorControl::GetInterface(), |
| 60 true }, | 61 true }, |
| 61 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, | 62 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, |
| 62 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, | 63 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, |
| 63 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, | 64 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, |
| 64 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, | 65 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, |
| 65 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, | 66 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, |
| 66 { PPB_FULLSCREEN_INTERFACE, PluginFullscreen::GetInterface(), true }, | 67 { PPB_FULLSCREEN_INTERFACE, PluginFullscreen::GetInterface(), true }, |
| 68 { PPB_GAMEPAD_DEV_INTERFACE, PluginGamepad::GetInterface(), true }, |
| 67 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, | 69 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, |
| 68 { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, | 70 { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, |
| 69 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, | 71 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, |
| 70 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, | 72 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, |
| 71 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, | 73 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, |
| 72 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, | 74 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, |
| 73 PluginInputEvent::GetKeyboardInterface(), true }, | 75 PluginInputEvent::GetKeyboardInterface(), true }, |
| 74 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, | 76 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, |
| 75 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, | 77 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, |
| 76 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, | 78 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 interface_name, NaClSrpcErrorString(srpc_result)); | 140 interface_name, NaClSrpcErrorString(srpc_result)); |
| 139 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 141 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
| 140 interface_map[index].ppb_interface = NULL; | 142 interface_map[index].ppb_interface = NULL; |
| 141 ppb_interface = NULL; | 143 ppb_interface = NULL; |
| 142 } | 144 } |
| 143 interface_map[index].needs_browser_check = false; | 145 interface_map[index].needs_browser_check = false; |
| 144 return ppb_interface; | 146 return ppb_interface; |
| 145 } | 147 } |
| 146 | 148 |
| 147 } // namespace ppapi_proxy | 149 } // namespace ppapi_proxy |
| OLD | NEW |