1 // Copyright 2014 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.
5 #include "base/logging.h"
6 #include "components/nacl/loader/nonsfi/irt_interfaces.h"
7 #include "ppapi/c/ppp.h"
8 #include "ppapi/nacl_irt/plugin_main.h"
9 #include "ppapi/nacl_irt/public/irt_ppapi.h"
15 struct PP_StartFunctions g_pp_functions
;
17 int IrtPpapiStart(const struct PP_StartFunctions
* funcs
) {
18 g_pp_functions
= *funcs
;
19 return PpapiPluginMain();
24 const struct nacl_irt_ppapihook kIrtPpapiHook
= {
26 PpapiPluginRegisterThreadCreator
,
32 int32_t PPP_InitializeModule(PP_Module module_id
,
33 PPB_GetInterface get_browser_interface
) {
34 return nacl::nonsfi::g_pp_functions
.PPP_InitializeModule(
35 module_id
, get_browser_interface
);
38 void PPP_ShutdownModule(void) {
39 nacl::nonsfi::g_pp_functions
.PPP_ShutdownModule();
42 const void *PPP_GetInterface(const char *interface_name
) {
43 return nacl::nonsfi::g_pp_functions
.PPP_GetInterface(interface_name
);