| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef EXAMPLES_HELLO_WORLD_HELPER_FUNCTIONS_H_ | |
| 6 #define EXAMPLES_HELLO_WORLD_HELPER_FUNCTIONS_H_ | |
| 7 | |
| 8 /// @file | |
| 9 /// These functions are stand-ins for your complicated computations which you | |
| 10 /// want to run in native code. We do two very simple things: return 42, and | |
| 11 /// reverse a string. But you can imagine putting more complicated things here | |
| 12 /// which might be difficult or slow to achieve in JavaScript, such as | |
| 13 /// cryptography, artificial intelligence, signal processing, physics modeling, | |
| 14 /// etc. See hello_world.cc for the code which is required for loading a NaCl | |
| 15 /// application and exposing methods to JavaScript. | |
| 16 | |
| 17 #include <ppapi/c/pp_stdint.h> | |
| 18 #include <string> | |
| 19 | |
| 20 namespace hello_world { | |
| 21 | |
| 22 /// This is the module's function that does the work to compute the value 42. | |
| 23 int32_t FortyTwo(); | |
| 24 | |
| 25 /// This function is passed a string and returns a copy of the string with the | |
| 26 /// characters in reverse order. | |
| 27 /// @param[in] text The string to reverse. | |
| 28 /// @return A copy of @a text with the characters in reverse order. | |
| 29 std::string ReverseText(const std::string& text); | |
| 30 | |
| 31 } // namespace hello_world | |
| 32 | |
| 33 #endif // EXAMPLES_HELLO_WORLD_HELPER_FUNCTIONS_H_ | |
| 34 | |
| OLD | NEW |