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

Unified Diff: native_client_sdk/src/examples/hello_world_glibc/helper_functions.h

Issue 9234043: Support GLBIC example. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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/hello_world_glibc/helper_functions.h
===================================================================
--- native_client_sdk/src/examples/hello_world_glibc/helper_functions.h (revision 0)
+++ native_client_sdk/src/examples/hello_world_glibc/helper_functions.h (revision 0)
@@ -0,0 +1,34 @@
+// 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.
+
+#ifndef EXAMPLES_HELLO_WORLD_HELPER_FUNCTIONS_H_
+#define EXAMPLES_HELLO_WORLD_HELPER_FUNCTIONS_H_
+
+/// @file
+/// These functions are stand-ins for your complicated computations which you
+/// want to run in native code. We do two very simple things: return 42, and
+/// reverse a string. But you can imagine putting more complicated things here
+/// which might be difficult or slow to achieve in JavaScript, such as
+/// cryptography, artificial intelligence, signal processing, physics modeling,
+/// etc. See hello_world.cc for the code which is required for loading a NaCl
+/// application and exposing methods to JavaScript.
+
+#include <ppapi/c/pp_stdint.h>
+#include <string>
+
+namespace hello_world {
+
+/// This is the module's function that does the work to compute the value 42.
+int32_t FortyTwo();
+
+/// This function is passed a string and returns a copy of the string with the
+/// characters in reverse order.
+/// @param[in] text The string to reverse.
+/// @return A copy of @a text with the characters in reverse order.
+std::string ReverseText(const std::string& text);
+
+} // namespace hello_world
+
+#endif // EXAMPLES_HELLO_WORLD_HELPER_FUNCTIONS_H_
+
Property changes on: native_client_sdk/src/examples/hello_world_glibc/helper_functions.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698