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..01bd48beca6ce9d5245d98ae8ac1e280ade23fcb 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 my_main(int argc, const char* argv[]) { |
|
nfullagar1
2013/05/23 21:58:36
example_main? main_entry?
noelallen1
2013/05/24 18:08:31
Done.
|
| 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; |
| } |
| + |
| +PPAPI_SIMPLE_MAIN(my_main) |
|
nfullagar1
2013/05/23 21:58:36
What does this do? What is the failure mode if it
noelallen1
2013/05/24 18:08:31
There are more details in the header, but this sho
|