Chromium Code Reviews| Index: native_client_sdk/src/libraries/ppapi_simple/ps_main.c |
| diff --git a/native_client_sdk/src/libraries/ppapi_simple/ps_main.cc b/native_client_sdk/src/libraries/ppapi_simple/ps_main.c |
| similarity index 69% |
| rename from native_client_sdk/src/libraries/ppapi_simple/ps_main.cc |
| rename to native_client_sdk/src/libraries/ppapi_simple/ps_main.c |
| index f9b8147be481fc409978fb118806898551f32954..40bd80a4516d42d55c866a5c174b6b22461b29b8 100644 |
| --- a/native_client_sdk/src/libraries/ppapi_simple/ps_main.cc |
| +++ b/native_client_sdk/src/libraries/ppapi_simple/ps_main.c |
| @@ -1,6 +1,8 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| -// Use of this source code is governed by a BSD-style license that can be |
| -// found in the LICENSE file. |
| +/* Copyright (c) 2015 The Chromium Authors. All rights reserved. |
|
Sam Clegg
2015/02/19 21:24:20
nit: might as well drop (c) if you are going to ch
binji
2015/02/20 17:33:48
Done.
|
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. */ |
| + |
| +#include "ppapi_simple/ps_main.h" |
| #ifdef __native_client__ |
| #include <irt.h> |
| @@ -10,18 +12,11 @@ |
| #include <stdio.h> |
| #include "nacl_io/nacl_io.h" |
| -#include "ppapi/c/pp_instance.h" |
| -#include "ppapi/c/pp_module.h" |
| #include "ppapi_simple/ps_instance.h" |
| -#include "ppapi_simple/ps_main.h" |
| -extern "C" int PpapiPluginMain(); |
| +extern PSMainFunc_t g_main_cb; |
| -void* PSMainCreate(PP_Instance inst, PSMainFunc_t entry_point) { |
| - PSInstance* pInst = new PSInstance(inst); |
| - pInst->SetMain(entry_point); |
| - return pInst; |
| -} |
| +int PpapiPluginMain(); |
| /** |
| * main entry point for ppapi_simple applications. This differs from the |
| @@ -31,7 +26,7 @@ void* PSMainCreate(PP_Instance inst, PSMainFunc_t entry_point) { |
| * and also under sel_ldr (no PPAPI). |
| */ |
| #ifdef __native_client__ |
| -extern "C" int __nacl_main(int argc, char* argv[]) { |
| +int __nacl_main(int argc, char* argv[]) { |
| struct nacl_irt_ppapihook hooks; |
| if (nacl_interface_query(NACL_IRT_PPAPIHOOK_v0_1, &hooks, sizeof(hooks)) == |
| sizeof(hooks)) { |
| @@ -49,3 +44,4 @@ int main(int argc, char* argv[]) { |
| nacl_io_uninit(); |
| return rtn; |
| } |
| + |
|
Sam Clegg
2015/02/19 21:24:20
nit: trailing newline.
binji
2015/02/20 17:33:48
Done.
|