| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 The Chromium Authors. All rights reserved. | 2 * Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include "native_client/src/untrusted/irt/irt.h" | 7 #include "native_client/src/untrusted/irt/irt.h" |
| 8 #include "native_client/src/untrusted/irt/irt_private.h" | 8 #include "native_client/src/untrusted/irt/irt_private.h" |
| 9 #include "ppapi/nacl_irt/irt_ppapi.h" | 9 #include "ppapi/nacl_irt/irt_ppapi.h" |
| 10 #include "ppapi/native_client/src/shared/ppapi_proxy/ppruntime.h" | 10 #include "ppapi/proxy/plugin_main_irt.h" |
| 11 | 11 |
| 12 struct PP_StartFunctions g_pp_functions; | 12 struct PP_StartFunctions g_pp_functions; |
| 13 | 13 |
| 14 static int irt_ppapi_start(const struct PP_StartFunctions* funcs) { | 14 static int irt_ppapi_start(const struct PP_StartFunctions* funcs) { |
| 15 /* Disable NaCl's open_resource() interface on this thread. */ | 15 /* Disable NaCl's open_resource() interface on this thread. */ |
| 16 g_is_main_thread = 1; | 16 g_is_main_thread = 1; |
| 17 | 17 |
| 18 g_pp_functions = *funcs; | 18 g_pp_functions = *funcs; |
| 19 return PpapiPluginMain(); | 19 return PpapiPluginMain(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 int32_t PPP_InitializeModule(PP_Module module_id, | 22 int32_t PPP_InitializeModule(PP_Module module_id, |
| 23 PPB_GetInterface get_browser_interface) { | 23 PPB_GetInterface get_browser_interface) { |
| 24 return g_pp_functions.PPP_InitializeModule(module_id, get_browser_interface); | 24 return g_pp_functions.PPP_InitializeModule(module_id, get_browser_interface); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void PPP_ShutdownModule(void) { | 27 void PPP_ShutdownModule(void) { |
| 28 g_pp_functions.PPP_ShutdownModule(); | 28 g_pp_functions.PPP_ShutdownModule(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 const void* PPP_GetInterface(const char* interface_name) { | 31 const void* PPP_GetInterface(const char* interface_name) { |
| 32 return g_pp_functions.PPP_GetInterface(interface_name); | 32 return g_pp_functions.PPP_GetInterface(interface_name); |
| 33 } | 33 } |
| 34 | 34 |
| 35 const struct nacl_irt_ppapihook nacl_irt_ppapihook = { | 35 const struct nacl_irt_ppapihook nacl_irt_ppapihook = { |
| 36 irt_ppapi_start, | 36 irt_ppapi_start, |
| 37 PpapiPluginRegisterThreadCreator, | 37 PpapiPluginRegisterThreadCreator, |
| 38 }; | 38 }; |
| OLD | NEW |