| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 /* | 7 /* |
| 8 * Post-message based test for simple rpc based access to name services. | 8 * Post-message based test for simple rpc based access to name services. |
| 9 * | 9 * |
| 10 * Converted from srpc_nameservice_test (deprecated), i.e., C -> C++, | 10 * Converted from srpc_nameservice_test (deprecated), i.e., C -> C++, |
| 11 * srpc -> post message. | 11 * srpc -> post message. |
| 12 */ | 12 */ |
| 13 #include <string> | 13 #include <string> |
| 14 | 14 |
| 15 #include <assert.h> | 15 #include <assert.h> |
| 16 #include <stdio.h> | 16 #include <stdio.h> |
| 17 #include <stdlib.h> | 17 #include <stdlib.h> |
| 18 #include <inttypes.h> | 18 #include <inttypes.h> |
| 19 #include <sys/fcntl.h> | 19 #include <sys/fcntl.h> |
| 20 #include <string.h> | 20 #include <string.h> |
| 21 #include <unistd.h> | 21 #include <unistd.h> |
| 22 | 22 |
| 23 #include "native_client/src/include/nacl_scoped_ptr.h" | 23 #include "native_client/src/include/nacl_scoped_ptr.h" |
| 24 #include "native_client/src/public/imc_syscalls.h" |
| 25 #include "native_client/src/public/name_service.h" |
| 24 #include "native_client/src/shared/srpc/nacl_srpc.h" | 26 #include "native_client/src/shared/srpc/nacl_srpc.h" |
| 25 #include "native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h" | 27 #include "native_client/src/untrusted/nacl_ppapi_util/nacl_ppapi_util.h" |
| 26 #include "native_client/src/untrusted/nacl_ppapi_util/string_buffer.h" | 28 #include "native_client/src/untrusted/nacl_ppapi_util/string_buffer.h" |
| 27 | 29 |
| 28 #include <sys/nacl_syscalls.h> | |
| 29 #include <sys/nacl_name_service.h> | |
| 30 | |
| 31 #include "ppapi/cpp/instance.h" | 30 #include "ppapi/cpp/instance.h" |
| 32 #include "ppapi/cpp/module.h" | 31 #include "ppapi/cpp/module.h" |
| 33 #include "ppapi/cpp/var.h" | 32 #include "ppapi/cpp/var.h" |
| 34 | 33 |
| 35 #define RNG_OUTPUT_BYTES 1024 | 34 #define RNG_OUTPUT_BYTES 1024 |
| 36 | 35 |
| 37 #define BYTES_PER_LINE 32 | 36 #define BYTES_PER_LINE 32 |
| 38 #define BYTE_SPACING 4 | 37 #define BYTE_SPACING 4 |
| 39 | 38 |
| 40 bool g_ns_channel_initialized = false; | 39 bool g_ns_channel_initialized = false; |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 }; | 256 }; |
| 258 | 257 |
| 259 namespace pp { | 258 namespace pp { |
| 260 | 259 |
| 261 // Factory function for your specialization of the Module object. | 260 // Factory function for your specialization of the Module object. |
| 262 Module* CreateModule() { | 261 Module* CreateModule() { |
| 263 return new MyModule(); | 262 return new MyModule(); |
| 264 } | 263 } |
| 265 | 264 |
| 266 } // namespace pp | 265 } // namespace pp |
| OLD | NEW |