| 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 #include "native_client/src/shared/platform/nacl_check.h" | 5 #include "native_client/src/shared/platform/nacl_check.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/ppb_context_3d_dev.h" | 7 #include "ppapi/c/dev/ppb_context_3d_dev.h" |
| 8 #include "ppapi/c/dev/ppb_cursor_control_dev.h" | 8 #include "ppapi/c/dev/ppb_cursor_control_dev.h" |
| 9 #include "ppapi/c/dev/ppb_font_dev.h" | 9 #include "ppapi/c/dev/ppb_font_dev.h" |
| 10 #include "ppapi/c/dev/ppb_fullscreen_dev.h" | 10 #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
| 11 #include "ppapi/c/dev/ppb_graphics_3d_dev.h" |
| 11 #include "ppapi/c/dev/ppb_memory_dev.h" | 12 #include "ppapi/c/dev/ppb_memory_dev.h" |
| 13 #include "ppapi/c/dev/ppb_opengles_dev.h" |
| 12 #include "ppapi/c/dev/ppb_scrollbar_dev.h" | 14 #include "ppapi/c/dev/ppb_scrollbar_dev.h" |
| 13 #include "ppapi/c/dev/ppb_surface_3d_dev.h" | 15 #include "ppapi/c/dev/ppb_surface_3d_dev.h" |
| 14 #include "ppapi/c/dev/ppb_testing_dev.h" | 16 #include "ppapi/c/dev/ppb_testing_dev.h" |
| 15 #include "ppapi/c/dev/ppb_var_deprecated.h" | 17 #include "ppapi/c/dev/ppb_var_deprecated.h" |
| 16 #include "ppapi/c/dev/ppb_widget_dev.h" | 18 #include "ppapi/c/dev/ppb_widget_dev.h" |
| 17 #include "ppapi/c/ppb_core.h" | 19 #include "ppapi/c/ppb_core.h" |
| 18 #include "ppapi/c/ppb_file_io.h" | 20 #include "ppapi/c/ppb_file_io.h" |
| 19 #include "ppapi/c/ppb_file_ref.h" | 21 #include "ppapi/c/ppb_file_ref.h" |
| 20 #include "ppapi/c/ppb_file_system.h" | 22 #include "ppapi/c/ppb_file_system.h" |
| 21 #include "ppapi/c/ppb_graphics_2d.h" | 23 #include "ppapi/c/ppb_graphics_2d.h" |
| 22 #include "ppapi/c/ppb_graphics_3d.h" | |
| 23 #include "ppapi/c/ppb_image_data.h" | 24 #include "ppapi/c/ppb_image_data.h" |
| 24 #include "ppapi/c/ppb_input_event.h" | 25 #include "ppapi/c/ppb_input_event.h" |
| 25 #include "ppapi/c/ppb_instance.h" | 26 #include "ppapi/c/ppb_instance.h" |
| 26 #include "ppapi/c/ppb_messaging.h" | 27 #include "ppapi/c/ppb_messaging.h" |
| 27 #include "ppapi/c/ppb_opengles.h" | |
| 28 #include "ppapi/c/ppb_url_loader.h" | 28 #include "ppapi/c/ppb_url_loader.h" |
| 29 #include "ppapi/c/ppb_url_request_info.h" | 29 #include "ppapi/c/ppb_url_request_info.h" |
| 30 #include "ppapi/c/ppb_url_response_info.h" | 30 #include "ppapi/c/ppb_url_response_info.h" |
| 31 #include "ppapi/c/ppb_var.h" | 31 #include "ppapi/c/ppb_var.h" |
| 32 | 32 |
| 33 #include "native_client/tests/ppapi_test_lib/get_browser_interface.h" | 33 #include "native_client/tests/ppapi_test_lib/get_browser_interface.h" |
| 34 #include "native_client/tests/ppapi_test_lib/internal_utils.h" | 34 #include "native_client/tests/ppapi_test_lib/internal_utils.h" |
| 35 | 35 |
| 36 const void* GetBrowserInterface(const char* interface_name) { | 36 const void* GetBrowserInterface(const char* interface_name) { |
| 37 return (*ppb_get_interface())(interface_name); | 37 return (*ppb_get_interface())(interface_name); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 63 const PPB_FileSystem* PPBFileSystem() { | 63 const PPB_FileSystem* PPBFileSystem() { |
| 64 return reinterpret_cast<const PPB_FileSystem*>( | 64 return reinterpret_cast<const PPB_FileSystem*>( |
| 65 GetBrowserInterface(PPB_FILESYSTEM_INTERFACE)); | 65 GetBrowserInterface(PPB_FILESYSTEM_INTERFACE)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 const PPB_Graphics2D* PPBGraphics2D() { | 68 const PPB_Graphics2D* PPBGraphics2D() { |
| 69 return reinterpret_cast<const PPB_Graphics2D*>( | 69 return reinterpret_cast<const PPB_Graphics2D*>( |
| 70 GetBrowserInterfaceSafe(PPB_GRAPHICS_2D_INTERFACE)); | 70 GetBrowserInterfaceSafe(PPB_GRAPHICS_2D_INTERFACE)); |
| 71 } | 71 } |
| 72 | 72 |
| 73 const PPB_Graphics3D* PPBGraphics3D() { | |
| 74 return reinterpret_cast<const PPB_Graphics3D*>( | |
| 75 GetBrowserInterface(PPB_GRAPHICS_3D_INTERFACE)); | |
| 76 } | |
| 77 | |
| 78 const PPB_ImageData* PPBImageData() { | 73 const PPB_ImageData* PPBImageData() { |
| 79 return reinterpret_cast<const PPB_ImageData*>( | 74 return reinterpret_cast<const PPB_ImageData*>( |
| 80 GetBrowserInterfaceSafe(PPB_IMAGEDATA_INTERFACE)); | 75 GetBrowserInterfaceSafe(PPB_IMAGEDATA_INTERFACE)); |
| 81 } | 76 } |
| 82 | 77 |
| 83 const PPB_InputEvent* PPBInputEvent() { | 78 const PPB_InputEvent* PPBInputEvent() { |
| 84 return reinterpret_cast<const PPB_InputEvent*>( | 79 return reinterpret_cast<const PPB_InputEvent*>( |
| 85 GetBrowserInterfaceSafe(PPB_INPUT_EVENT_INTERFACE)); | 80 GetBrowserInterfaceSafe(PPB_INPUT_EVENT_INTERFACE)); |
| 86 } | 81 } |
| 87 | 82 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 98 const PPB_Messaging* PPBMessaging() { | 93 const PPB_Messaging* PPBMessaging() { |
| 99 return reinterpret_cast<const PPB_Messaging*>( | 94 return reinterpret_cast<const PPB_Messaging*>( |
| 100 GetBrowserInterfaceSafe(PPB_MESSAGING_INTERFACE)); | 95 GetBrowserInterfaceSafe(PPB_MESSAGING_INTERFACE)); |
| 101 } | 96 } |
| 102 | 97 |
| 103 const PPB_MouseInputEvent* PPBMouseInputEvent() { | 98 const PPB_MouseInputEvent* PPBMouseInputEvent() { |
| 104 return reinterpret_cast<const PPB_MouseInputEvent*>( | 99 return reinterpret_cast<const PPB_MouseInputEvent*>( |
| 105 GetBrowserInterfaceSafe(PPB_MOUSE_INPUT_EVENT_INTERFACE)); | 100 GetBrowserInterfaceSafe(PPB_MOUSE_INPUT_EVENT_INTERFACE)); |
| 106 } | 101 } |
| 107 | 102 |
| 108 const PPB_OpenGLES2* PPBOpenGLES2() { | |
| 109 return reinterpret_cast<const PPB_OpenGLES2*>( | |
| 110 GetBrowserInterface(PPB_OPENGLES2_INTERFACE)); | |
| 111 } | |
| 112 | |
| 113 const PPB_URLLoader* PPBURLLoader() { | 103 const PPB_URLLoader* PPBURLLoader() { |
| 114 return reinterpret_cast<const PPB_URLLoader*>( | 104 return reinterpret_cast<const PPB_URLLoader*>( |
| 115 GetBrowserInterfaceSafe(PPB_URLLOADER_INTERFACE)); | 105 GetBrowserInterfaceSafe(PPB_URLLOADER_INTERFACE)); |
| 116 } | 106 } |
| 117 | 107 |
| 118 const PPB_URLRequestInfo* PPBURLRequestInfo() { | 108 const PPB_URLRequestInfo* PPBURLRequestInfo() { |
| 119 return reinterpret_cast<const PPB_URLRequestInfo*>( | 109 return reinterpret_cast<const PPB_URLRequestInfo*>( |
| 120 GetBrowserInterfaceSafe(PPB_URLREQUESTINFO_INTERFACE)); | 110 GetBrowserInterfaceSafe(PPB_URLREQUESTINFO_INTERFACE)); |
| 121 } | 111 } |
| 122 | 112 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 141 const PPB_Context3D_Dev* PPBContext3DDev() { | 131 const PPB_Context3D_Dev* PPBContext3DDev() { |
| 142 return reinterpret_cast<const PPB_Context3D_Dev*>( | 132 return reinterpret_cast<const PPB_Context3D_Dev*>( |
| 143 GetBrowserInterface(PPB_CONTEXT_3D_DEV_INTERFACE)); | 133 GetBrowserInterface(PPB_CONTEXT_3D_DEV_INTERFACE)); |
| 144 } | 134 } |
| 145 | 135 |
| 146 const PPB_CursorControl_Dev* PPBCursorControlDev() { | 136 const PPB_CursorControl_Dev* PPBCursorControlDev() { |
| 147 return reinterpret_cast<const PPB_CursorControl_Dev*>( | 137 return reinterpret_cast<const PPB_CursorControl_Dev*>( |
| 148 GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE)); | 138 GetBrowserInterface(PPB_CURSOR_CONTROL_DEV_INTERFACE)); |
| 149 } | 139 } |
| 150 | 140 |
| 141 const PPB_Graphics3D_Dev* PPBGraphics3DDev() { |
| 142 return reinterpret_cast<const PPB_Graphics3D_Dev*>( |
| 143 GetBrowserInterface(PPB_GRAPHICS_3D_DEV_INTERFACE)); |
| 144 } |
| 145 |
| 151 const PPB_Font_Dev* PPBFontDev() { | 146 const PPB_Font_Dev* PPBFontDev() { |
| 152 return reinterpret_cast<const PPB_Font_Dev*>( | 147 return reinterpret_cast<const PPB_Font_Dev*>( |
| 153 GetBrowserInterface(PPB_FONT_DEV_INTERFACE)); | 148 GetBrowserInterface(PPB_FONT_DEV_INTERFACE)); |
| 154 } | 149 } |
| 155 | 150 |
| 156 const PPB_Fullscreen_Dev* PPBFullscreenDev() { | 151 const PPB_Fullscreen_Dev* PPBFullscreenDev() { |
| 157 return reinterpret_cast<const PPB_Fullscreen_Dev*>( | 152 return reinterpret_cast<const PPB_Fullscreen_Dev*>( |
| 158 GetBrowserInterface(PPB_FULLSCREEN_DEV_INTERFACE)); | 153 GetBrowserInterface(PPB_FULLSCREEN_DEV_INTERFACE)); |
| 159 } | 154 } |
| 160 | 155 |
| 161 const PPB_Memory_Dev* PPBMemoryDev() { | 156 const PPB_Memory_Dev* PPBMemoryDev() { |
| 162 return reinterpret_cast<const PPB_Memory_Dev*>( | 157 return reinterpret_cast<const PPB_Memory_Dev*>( |
| 163 GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE)); | 158 GetBrowserInterface(PPB_MEMORY_DEV_INTERFACE)); |
| 164 } | 159 } |
| 165 | 160 |
| 161 const PPB_OpenGLES2_Dev* PPBOpenGLES2Dev() { |
| 162 return reinterpret_cast<const PPB_OpenGLES2_Dev*>( |
| 163 GetBrowserInterface(PPB_OPENGLES2_DEV_INTERFACE)); |
| 164 } |
| 165 |
| 166 const PPB_Scrollbar_Dev* PPBScrollbarDev() { | 166 const PPB_Scrollbar_Dev* PPBScrollbarDev() { |
| 167 return reinterpret_cast<const PPB_Scrollbar_Dev*>( | 167 return reinterpret_cast<const PPB_Scrollbar_Dev*>( |
| 168 GetBrowserInterface(PPB_SCROLLBAR_DEV_INTERFACE)); | 168 GetBrowserInterface(PPB_SCROLLBAR_DEV_INTERFACE)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 const PPB_Surface3D_Dev* PPBSurface3DDev() { | 171 const PPB_Surface3D_Dev* PPBSurface3DDev() { |
| 172 return reinterpret_cast<const PPB_Surface3D_Dev*>( | 172 return reinterpret_cast<const PPB_Surface3D_Dev*>( |
| 173 GetBrowserInterface(PPB_SURFACE_3D_DEV_INTERFACE)); | 173 GetBrowserInterface(PPB_SURFACE_3D_DEV_INTERFACE)); |
| 174 } | 174 } |
| 175 | 175 |
| 176 const PPB_Testing_Dev* PPBTestingDev() { | 176 const PPB_Testing_Dev* PPBTestingDev() { |
| 177 return reinterpret_cast<const PPB_Testing_Dev*>( | 177 return reinterpret_cast<const PPB_Testing_Dev*>( |
| 178 GetBrowserInterface(PPB_TESTING_DEV_INTERFACE)); | 178 GetBrowserInterface(PPB_TESTING_DEV_INTERFACE)); |
| 179 } | 179 } |
| 180 | 180 |
| 181 const PPB_Widget_Dev* PPBWidgetDev() { | 181 const PPB_Widget_Dev* PPBWidgetDev() { |
| 182 return reinterpret_cast<const PPB_Widget_Dev*>( | 182 return reinterpret_cast<const PPB_Widget_Dev*>( |
| 183 GetBrowserInterface(PPB_WIDGET_DEV_INTERFACE)); | 183 GetBrowserInterface(PPB_WIDGET_DEV_INTERFACE)); |
| 184 } | 184 } |
| OLD | NEW |