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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 { PPB_AUDIO_INTERFACE, PluginAudio::GetInterface(), true }, | 53 { PPB_AUDIO_INTERFACE, PluginAudio::GetInterface(), true }, |
54 { PPB_AUDIO_CONFIG_INTERFACE, PluginAudioConfig::GetInterface(), true }, | 54 { PPB_AUDIO_CONFIG_INTERFACE, PluginAudioConfig::GetInterface(), true }, |
55 { PPB_CORE_INTERFACE, PluginCore::GetInterface(), true }, | 55 { PPB_CORE_INTERFACE, PluginCore::GetInterface(), true }, |
56 { PPB_CURSOR_CONTROL_DEV_INTERFACE, PluginCursorControl::GetInterface(), | 56 { PPB_CURSOR_CONTROL_DEV_INTERFACE, PluginCursorControl::GetInterface(), |
57 true }, | 57 true }, |
58 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, | 58 { PPB_FILEIO_INTERFACE, PluginFileIO::GetInterface(), true }, |
59 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, | 59 { PPB_FILEREF_INTERFACE, PluginFileRef::GetInterface(), true }, |
60 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, | 60 { PPB_FILESYSTEM_INTERFACE, PluginFileSystem::GetInterface(), true }, |
61 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, | 61 { PPB_FIND_DEV_INTERFACE, PluginFind::GetInterface(), true }, |
62 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, | 62 { PPB_FONT_DEV_INTERFACE, PluginFont::GetInterface(), true }, |
63 { PPB_FULLSCREEN_DEV_INTERFACE, PluginFullscreen::GetInterface(), true }, | 63 { PPB_FULLSCREEN_INTERFACE, PluginFullscreen::GetInterface(), true }, |
64 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, | 64 { PPB_GRAPHICS_2D_INTERFACE, PluginGraphics2D::GetInterface(), true }, |
65 { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, | 65 { PPB_GRAPHICS_3D_INTERFACE, PluginGraphics3D::GetInterface(), true }, |
66 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, | 66 { PPB_IMAGEDATA_INTERFACE, PluginImageData::GetInterface(), true }, |
67 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, | 67 { PPB_INPUT_EVENT_INTERFACE, PluginInputEvent::GetInterface(), true }, |
68 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, | 68 { PPB_INSTANCE_INTERFACE, PluginInstance::GetInterface(), true }, |
69 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, | 69 { PPB_KEYBOARD_INPUT_EVENT_INTERFACE, |
70 PluginInputEvent::GetKeyboardInterface(), true }, | 70 PluginInputEvent::GetKeyboardInterface(), true }, |
71 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, | 71 { PPB_MEMORY_DEV_INTERFACE, PluginMemory::GetInterface(), true }, |
72 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, | 72 { PPB_MESSAGING_INTERFACE, PluginMessaging::GetInterface(), true }, |
73 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, | 73 { PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 interface_name, NaClSrpcErrorString(srpc_result)); | 126 interface_name, NaClSrpcErrorString(srpc_result)); |
127 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { | 127 if (srpc_result != NACL_SRPC_RESULT_OK || !browser_exports_interface) { |
128 interface_map[index].ppb_interface = NULL; | 128 interface_map[index].ppb_interface = NULL; |
129 ppb_interface = NULL; | 129 ppb_interface = NULL; |
130 } | 130 } |
131 interface_map[index].needs_browser_check = false; | 131 interface_map[index].needs_browser_check = false; |
132 return ppb_interface; | 132 return ppb_interface; |
133 } | 133 } |
134 | 134 |
135 } // namespace ppapi_proxy | 135 } // namespace ppapi_proxy |
OLD | NEW |