| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 {{generator_warning}} | 5 {{generator_warning}} |
| 6 | 6 |
| 7 #include "{{bindings_dir}}/mojo_syscall.h" | 7 #include "{{bindings_dir}}/mojo_syscall.h" |
| 8 | 8 |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 | 10 |
| 11 #include "{{bindings_dir}}/mojo_syscall_internal.h" | 11 #include "{{bindings_dir}}/mojo_syscall_internal.h" |
| 12 #include "mojo/public/c/system/buffer.h" | 12 #include "mojo/public/c/system/buffer.h" |
| 13 #include "mojo/public/c/system/data_pipe.h" | 13 #include "mojo/public/c/system/data_pipe.h" |
| 14 #include "mojo/public/c/system/handle.h" | 14 #include "mojo/public/c/system/handle.h" |
| 15 #include "mojo/public/c/system/message_pipe.h" | 15 #include "mojo/public/c/system/message_pipe.h" |
| 16 #include "mojo/public/c/system/result.h" | 16 #include "mojo/public/c/system/result.h" |
| 17 #include "mojo/public/c/system/types.h" | 17 #include "mojo/public/c/system/time.h" |
| 18 #include "mojo/public/platform/native/system_impl_private.h" | 18 #include "mojo/public/platform/native/system_impl_private.h" |
| 19 #include "native_client/src/public/chrome_main.h" | 19 #include "native_client/src/public/chrome_main.h" |
| 20 #include "native_client/src/public/nacl_app.h" | 20 #include "native_client/src/public/nacl_app.h" |
| 21 #include "native_client/src/trusted/desc/nacl_desc_custom.h" | 21 #include "native_client/src/trusted/desc/nacl_desc_custom.h" |
| 22 | 22 |
| 23 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID; | 23 MojoHandle g_mojo_handle = MOJO_HANDLE_INVALID; |
| 24 MojoSystemImpl g_mojo_system = nullptr; | 24 MojoSystemImpl g_mojo_system = nullptr; |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 MojoResult InjectMojo(struct NaClApp* nap, MojoHandle handle) { | 106 MojoResult InjectMojo(struct NaClApp* nap, MojoHandle handle) { |
| 107 NaClAppSetDesc(nap, NACL_MOJO_DESC, MakeMojoDesc(nap)); | 107 NaClAppSetDesc(nap, NACL_MOJO_DESC, MakeMojoDesc(nap)); |
| 108 g_mojo_system = MojoSystemImplCreateImpl(); | 108 g_mojo_system = MojoSystemImplCreateImpl(); |
| 109 return MojoSystemImplTransferHandle(MojoSystemImplGetDefaultImpl(), handle, | 109 return MojoSystemImplTransferHandle(MojoSystemImplGetDefaultImpl(), handle, |
| 110 g_mojo_system, &g_mojo_handle); | 110 g_mojo_system, &g_mojo_handle); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void InjectDisabledMojo(struct NaClApp* nap) { | 113 void InjectDisabledMojo(struct NaClApp* nap) { |
| 114 NaClAppSetDesc(nap, NACL_MOJO_DESC, MakeDisabledMojoDesc(nap)); | 114 NaClAppSetDesc(nap, NACL_MOJO_DESC, MakeDisabledMojoDesc(nap)); |
| 115 } | 115 } |
| OLD | NEW |