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 3 // found in the LICENSE file. 4 // 5 // Defines helper functions for all interfaces supported by the Native Client 6 // proxy. 7 8 #ifndef NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_GET_BROWSER_INTERFACE_H 9 #define NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_GET_BROWSER_INTERFACE_H 10 11 #include "ppapi/c/ppb_audio.h" 12 #include "ppapi/c/ppb_audio_config.h" 13 #include "ppapi/c/ppb_core.h" 14 #include "ppapi/c/ppb_file_io.h" 15 #include "ppapi/c/ppb_file_ref.h" 16 #include "ppapi/c/ppb_file_system.h" 17 #include "ppapi/c/ppb_fullscreen.h" 18 #include "ppapi/c/ppb_graphics_2d.h" 19 #include "ppapi/c/ppb_graphics_3d.h" 20 #include "ppapi/c/ppb_image_data.h" 21 #include "ppapi/c/ppb_input_event.h" 22 #include "ppapi/c/ppb_instance.h" 23 #include "ppapi/c/ppb_messaging.h" 24 #include "ppapi/c/ppb_mouse_cursor.h" 25 #include "ppapi/c/ppb_opengles2.h" 26 #include "ppapi/c/ppb_url_loader.h" 27 #include "ppapi/c/ppb_url_request_info.h" 28 #include "ppapi/c/ppb_url_response_info.h" 29 #include "ppapi/c/ppb_var.h" 30 #include "ppapi/c/ppb_view.h" 31 #include "ppapi/c/dev/ppb_font_dev.h" 32 #include "ppapi/c/dev/ppb_memory_dev.h" 33 #include "ppapi/c/private/ppb_testing_private.h" 34 35 // Looks up the interface and returns its pointer or NULL. 36 const void* GetBrowserInterface(const char* interface_name); 37 // Uses GetBrowserInterface() and CHECKs for NULL. 38 const void* GetBrowserInterfaceSafe(const char* interface_name); 39 40 // 41 // Stable interfaces. 42 // Lookup guarantees that the interface is available by using NULL CHECKs. 43 // 44 45 const PPB_Audio* PPBAudio(); 46 const PPB_AudioConfig* PPBAudioConfig(); 47 const PPB_Core* PPBCore(); 48 const PPB_FileIO* PPBFileIO(); 49 const PPB_FileRef* PPBFileRef(); 50 const PPB_FileSystem* PPBFileSystem(); 51 const PPB_Fullscreen* PPBFullscreen(); 52 const PPB_Graphics2D* PPBGraphics2D(); 53 const PPB_Graphics3D* PPBGraphics3D(); 54 const PPB_ImageData* PPBImageData(); 55 const PPB_InputEvent* PPBInputEvent(); 56 const PPB_Instance* PPBInstance(); 57 const PPB_KeyboardInputEvent* PPBKeyboardInputEvent(); 58 const PPB_Messaging* PPBMessaging(); 59 const PPB_MouseCursor* PPBMouseCursor(); 60 const PPB_MouseInputEvent* PPBMouseInputEvent(); 61 const PPB_OpenGLES2* PPBOpenGLES2(); 62 const PPB_URLLoader* PPBURLLoader(); 63 const PPB_URLRequestInfo* PPBURLRequestInfo(); 64 const PPB_URLResponseInfo* PPBURLResponseInfo(); 65 const PPB_Var* PPBVar(); 66 const PPB_View* PPBView(); 67 const PPB_WheelInputEvent* PPBWheelInputEvent(); 68 69 // 70 // Experimental (aka Dev) interfaces. 71 // Lookup returns NULL if the interface is not available. 72 // 73 74 const PPB_Font_Dev* PPBFontDev(); 75 const PPB_Memory_Dev* PPBMemoryDev(); 76 77 // 78 // Private interfaces. 79 // Lookup returns NULL if the interface is not available. 80 // 81 82 const PPB_Testing_Private* PPBTestingPrivate(); 83 84 #endif // NATIVE_CLIENT_TESTS_PPAPI_TEST_PPB_TEMPLATE_GET_BROWSER_INTERFACE_H 85