Chromium Code Reviews| Index: native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c |
| diff --git a/native_client_sdk/src/examples/getting_started/hello_world_ppapi_main/hello_world.c b/native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c |
| similarity index 51% |
| rename from native_client_sdk/src/examples/getting_started/hello_world_ppapi_main/hello_world.c |
| rename to native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c |
| index 1d3d6f10ffafa2b84d1ca071b5bf75fd99dac226..4bbefb1bfe7689f65836c1b18f7f91964766d50e 100644 |
| --- a/native_client_sdk/src/examples/getting_started/hello_world_ppapi_main/hello_world.c |
| +++ b/native_client_sdk/src/examples/getting_started/simple_hello_world/hello_world.c |
| @@ -10,27 +10,10 @@ |
| #include "ppapi/c/ppb_messaging.h" |
| #include "ppapi/c/ppb_console.h" |
| -#include "ppapi_main/ppapi_main.h" |
| - |
| -// The default arguments to PPAPI_MAIN maps: |
| -// STDIN -> /dev/stdin |
| -// STDOUT -> /dev/stdout |
| -// STDERR -> /dev/console3 |
| -// We use our own args here so that stdout sends messages to JavaScript via |
| -// PostMessage (/dev/tty). |
| -PPAPI_MAIN_WITH_ARGS("pm_stdout", "/dev/tty", NULL, NULL) |
| - |
| -// |
| -// The "main" entry point called by PPAPIInstance once initialization |
| -// takes place. This is called off the main thread, which is hidden |
| -// from the developer, making it safe to use blocking calls. |
| -// The arguments are provided as: |
| -// argv[0] = "NEXE" |
| -// argv[1] = "--<KEY>" |
| -// argv[2] = "<VALUE>" |
| -// Where the embed tag for this module uses KEY=VALUE |
| -// |
| -int ppapi_main(int argc, const char* argv[]) { |
| +#include "ppapi_simple/ppapi_simple_main.h" |
| + |
| + |
| +int example_main(int argc, const char* argv[]) { |
| int index = 1; |
| // Use PostMessage to send "Hello World" to JavaScript. |
| @@ -48,3 +31,5 @@ int ppapi_main(int argc, const char* argv[]) { |
| } |
| return 0; |
| } |
| + |
|
nfullagar1
2013/05/28 18:28:53
need comment here to direct reader to appropriate
noelallen_use_chromium
2013/05/30 00:25:07
Done.
|
| +PPAPI_SIMPLE_REGISTER_MAIN(example_main) |