| 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 # pylint: disable=F0401 | 5 # pylint: disable=F0401 |
| 6 | 6 |
| 7 import interface_dsl | 7 import interface_dsl |
| 8 | 8 |
| 9 def MakeInterface(): | 9 def MakeInterface(): |
| 10 mojo = interface_dsl.Interface() | 10 mojo = interface_dsl.Interface() |
| 11 | 11 |
| 12 # This function is not provided by the Mojo system APIs, but instead allows | 12 # This function is not provided by the Mojo system APIs, but instead allows |
| 13 # trusted code to provide a handle for use by untrusted code. See the | 13 # trusted code to provide a handle for use by untrusted code. See the |
| 14 # implementation in mojo_syscall.cc.tmpl. | 14 # implementation in mojo_syscall.cc.tmpl. |
| 15 f = mojo.Func('_MojoGetInitialHandle', 'MojoResult') | 15 f = mojo.Func('_MojoGetInitialHandle', 'MojoResult') |
| 16 f.Param('handle').Out('MojoHandle') | 16 f.Param('handle').Out('MojoHandle') |
| 17 | 17 |
| 18 f = mojo.Func('MojoGetTimeTicksNow', 'MojoTimeTicks') | 18 f = mojo.Func('MojoGetTimeTicksNow', 'MojoTimeTicks') |
| 19 | 19 |
| 20 f = mojo.Func('MojoClose', 'MojoResult') | 20 f = mojo.Func('MojoClose', 'MojoResult') |
| 21 f.Param('handle').In('MojoHandle') | 21 f.Param('handle').In('MojoHandle') |
| 22 | 22 |
| 23 f = mojo.Func('MojoGetRights', 'MojoResult') | 23 f = mojo.Func('MojoGetRights', 'MojoResult') |
| 24 f.Param('handle').In('MojoHandle') | 24 f.Param('handle').In('MojoHandle') |
| 25 f.Param('rights').Out('MojoHandleRights') | 25 f.Param('rights').Out('MojoHandleRights') |
| 26 | 26 |
| 27 f = mojo.Func('MojoReplaceHandleWithReducedRights', 'MojoResult') |
| 28 f.Param('handle').In('MojoHandle') |
| 29 f.Param('rights_to_remove').In('MojoHandleRights') |
| 30 f.Param('replacement_handle').Out('MojoHandle') |
| 31 |
| 27 f = mojo.Func('MojoDuplicateHandleWithReducedRights', 'MojoResult') | 32 f = mojo.Func('MojoDuplicateHandleWithReducedRights', 'MojoResult') |
| 28 f.Param('handle').In('MojoHandle') | 33 f.Param('handle').In('MojoHandle') |
| 29 f.Param('rights_to_remove').In('MojoHandleRights') | 34 f.Param('rights_to_remove').In('MojoHandleRights') |
| 30 f.Param('new_handle').Out('MojoHandle') | 35 f.Param('new_handle').Out('MojoHandle') |
| 31 | 36 |
| 32 f = mojo.Func('MojoDuplicateHandle', 'MojoResult') | 37 f = mojo.Func('MojoDuplicateHandle', 'MojoResult') |
| 33 f.Param('handle').In('MojoHandle') | 38 f.Param('handle').In('MojoHandle') |
| 34 f.Param('new_handle').Out('MojoHandle') | 39 f.Param('new_handle').Out('MojoHandle') |
| 35 | 40 |
| 36 f = mojo.Func('MojoWait', 'MojoResult') | 41 f = mojo.Func('MojoWait', 'MojoResult') |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 171 |
| 167 f = mojo.Func('MojoUnmapBuffer', 'MojoResult') | 172 f = mojo.Func('MojoUnmapBuffer', 'MojoResult') |
| 168 f.Param('buffer').In('void*') | 173 f.Param('buffer').In('void*') |
| 169 # TODO(ncbray): support mmaping. | 174 # TODO(ncbray): support mmaping. |
| 170 # https://code.google.com/p/chromium/issues/detail?id=401761 | 175 # https://code.google.com/p/chromium/issues/detail?id=401761 |
| 171 f.IsBrokenInNaCl() | 176 f.IsBrokenInNaCl() |
| 172 | 177 |
| 173 mojo.Finalize() | 178 mojo.Finalize() |
| 174 | 179 |
| 175 return mojo | 180 return mojo |
| OLD | NEW |