| 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_gamepad.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_2d.h" |
| 23 #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" |
| 24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_host_resolver_private.
h" |
| 24 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" | 25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_image_data.h" |
| 25 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" | 26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_input_event.h" |
| 26 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" | 27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_instance.h" |
| 27 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" | 28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_memory.h" |
| 28 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" | 29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_messaging.h" |
| 29 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" | 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_mouse_lock.h" |
| 30 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_net_address_private.h" | 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_net_address_private.h" |
| 31 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" | 32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_pdf.h" |
| 32 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" | 33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_scrollbar.h" |
| 33 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_server_socket_priv
ate.h" | 34 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_tcp_server_socket_priv
ate.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 true }, | 67 true }, |
| 67 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, | 68 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, |
| 68 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, | 69 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, |
| 69 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, | 70 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, |
| 70 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, | 71 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, |
| 71 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, | 72 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, |
| 72 { PPB_FULLSCREEN_INTERFACE, PluginFullscreen::GetInterface(), true }, | 73 { PPB_FULLSCREEN_INTERFACE, PluginFullscreen::GetInterface(), true }, |
| 73 { PPB_GAMEPAD_INTERFACE, PluginGamepad::GetInterface(), true }, | 74 { PPB_GAMEPAD_INTERFACE, PluginGamepad::GetInterface(), true }, |
| 74 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, | 75 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, |
| 75 { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, | 76 { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, |
| 77 { PPB_HOSTRESOLVER_PRIVATE_INTERFACE, |
| 78 PluginHostResolverPrivate::GetInterface(), true }, |
| 76 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, | 79 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, |
| 77 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, | 80 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, |
| 78 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, | 81 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, |
| 79 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, | 82 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, |
| 80 PluginInputEvent::GetKeyboardInterface(), true }, | 83 PluginInputEvent::GetKeyboardInterface(), true }, |
| 81 { PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE, | 84 { PPB_KEYBOARD_INPUT_EVENT_DEV_INTERFACE, |
| 82 PluginInputEvent::GetKeyboardInterface_Dev(), true }, | 85 PluginInputEvent::GetKeyboardInterface_Dev(), true }, |
| 83 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, | 86 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, |
| 84 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, | 87 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, |
| 85 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, | 88 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 interface_name, NaClSrpcErrorString(srpc_result)); | 179 interface_name, NaClSrpcErrorString(srpc_result)); |
| 177 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 180 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
| 178 interface_map[index].ppb_interface = NULL; | 181 interface_map[index].ppb_interface = NULL; |
| 179 ppb_interface = NULL; | 182 ppb_interface = NULL; |
| 180 } | 183 } |
| 181 interface_map[index].needs_browser_check = false; | 184 interface_map[index].needs_browser_check = false; |
| 182 return ppb_interface; | 185 return ppb_interface; |
| 183 } | 186 } |
| 184 | 187 |
| 185 } // namespace ppapi_proxy | 188 } // namespace ppapi_proxy |
| OLD | NEW |