| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client 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 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 | 9 |
| 10 #include "native_client/src/include/build_config.h" | 10 #include "native_client/src/include/build_config.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 NaClHandle channel; | 114 NaClHandle channel; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 void WINAPI DummyRendererThread(void *thread_arg) { | 117 void WINAPI DummyRendererThread(void *thread_arg) { |
| 118 struct ThreadArgs *args = (struct ThreadArgs *) thread_arg; | 118 struct ThreadArgs *args = (struct ThreadArgs *) thread_arg; |
| 119 | 119 |
| 120 DummyLauncher launcher(args->channel); | 120 DummyLauncher launcher(args->channel); |
| 121 NaClSrpcChannel trusted_channel; | 121 NaClSrpcChannel trusted_channel; |
| 122 NaClSrpcChannel untrusted_channel; | 122 NaClSrpcChannel untrusted_channel; |
| 123 CHECK(launcher.SetupCommand(&trusted_channel)); | 123 CHECK(launcher.SetupCommand(&trusted_channel)); |
| 124 CHECK(launcher.StartModuleAndSetupAppChannel(&trusted_channel, | 124 CHECK(launcher.StartModule(&trusted_channel)); |
| 125 &untrusted_channel)); | 125 CHECK(launcher.SetupAppChannel(&untrusted_channel)); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void ExampleDescDestroy(void *handle) { | 128 void ExampleDescDestroy(void *handle) { |
| 129 UNREFERENCED_PARAMETER(handle); | 129 UNREFERENCED_PARAMETER(handle); |
| 130 } | 130 } |
| 131 | 131 |
| 132 ssize_t ExampleDescSendMsg(void *handle, | 132 ssize_t ExampleDescSendMsg(void *handle, |
| 133 const struct NaClImcTypedMsgHdr *msg, | 133 const struct NaClImcTypedMsgHdr *msg, |
| 134 int flags) { | 134 int flags) { |
| 135 UNREFERENCED_PARAMETER(handle); | 135 UNREFERENCED_PARAMETER(handle); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 252 |
| 253 NaClThread thread; | 253 NaClThread thread; |
| 254 CHECK(NaClThreadCtor(&thread, DummyRendererThread, &thread_args, | 254 CHECK(NaClThreadCtor(&thread, DummyRendererThread, &thread_args, |
| 255 NACL_KERN_STACK_SIZE)); | 255 NACL_KERN_STACK_SIZE)); |
| 256 | 256 |
| 257 int status = 1; | 257 int status = 1; |
| 258 NaClChromeMainStart(nap, args, &status); | 258 NaClChromeMainStart(nap, args, &status); |
| 259 NaClExit(status); | 259 NaClExit(status); |
| 260 return 1; | 260 return 1; |
| 261 } | 261 } |
| OLD | NEW |