James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef MOJO_NACL_MOJO_SYSCALL_H_ |
| 6 | #define MOJO_NACL_MOJO_SYSCALL_H_ |
| 7 | |
Justin TerAvest | 409959d | 2015-01-27 14:59:40 -0700 | [diff] [blame] | 8 | #include "mojo/public/c/system/types.h" |
| 9 | |
| 10 | // Injects a NaClDesc for Mojo support and sets a MojoHandle to be provided to |
| 11 | // untrusted code as a "service provider" MojoHandle. This provides the |
| 12 | // implementation of the Mojo system API outside the NaCl sandbox and allows |
| 13 | // untrusted code to communicate with Mojo interfaces outside the sandbox or in |
| 14 | // other processes. |
Nick Bray | da897d6 | 2015-04-08 16:28:55 -0700 | [diff] [blame] | 15 | MojoResult InjectMojo(struct NaClApp* nap, MojoHandle handle); |
James Robinson | 646469d | 2014-10-03 15:33:28 -0700 | [diff] [blame] | 16 | |
Justin TerAvest | 2ec2bda | 2014-11-25 13:52:06 -0700 | [diff] [blame] | 17 | // Injects a "disabled" NaClDesc for Mojo support. This is to make debugging |
| 18 | // more straightforward in the case where Mojo is not enabled for NaCl plugins. |
| 19 | void InjectDisabledMojo(struct NaClApp* nap); |
| 20 | |
Nick Bray | b0e6d97 | 2015-02-26 11:22:57 -0800 | [diff] [blame] | 21 | #endif // MOJO_NACL_MOJO_SYSCALL_H_ |