Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: native_client_sdk/src/examples/getting_started/hello_world_ppapi_main/hello_world.c

Issue 15011003: ppapi_simple (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/examples/getting_started/hello_world_ppapi_main/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/hello_world_ppapi_main/hello_world.c
deleted file mode 100644
index 1d3d6f10ffafa2b84d1ca071b5bf75fd99dac226..0000000000000000000000000000000000000000
--- a/native_client_sdk/src/examples/getting_started/hello_world_ppapi_main/hello_world.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/* 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.
- */
-
-#include <stdio.h>
-#include <string.h>
-
-#include "ppapi/c/ppb_var.h"
-#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[]) {
- int index = 1;
-
- // Use PostMessage to send "Hello World" to JavaScript.
- printf("Hello World STDOUT.\n");
-
- // Use PPAPI Console interface to send "Hello World" to the
- // JavaScript Console.
- fprintf(stderr, "Hello World STDERR.\n");
-
- // Print the arguments we received from the web page
- printf("NAME: %s\n", argv[0]);
- while (index + 2 < argc) {
- printf(" ARGS: %s=%s\n", argv[index + 0], argv[index + 1]);
- index += 2;
- }
- return 0;
-}

Powered by Google App Engine
This is Rietveld 408576698