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 # distutils language = c++ | 5 # distutils language = c++ |
6 | 6 |
7 cimport c_core | 7 cimport c_core |
8 cimport c_environment | 8 cimport c_environment |
9 | 9 |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 HANDLE_SIGNAL_WRITABLE = c_core.MOJO_HANDLE_SIGNAL_WRITABLE | 55 HANDLE_SIGNAL_WRITABLE = c_core.MOJO_HANDLE_SIGNAL_WRITABLE |
56 WRITE_MESSAGE_FLAG_NONE = c_core.MOJO_WRITE_MESSAGE_FLAG_NONE | 56 WRITE_MESSAGE_FLAG_NONE = c_core.MOJO_WRITE_MESSAGE_FLAG_NONE |
57 READ_MESSAGE_FLAG_NONE = c_core.MOJO_READ_MESSAGE_FLAG_NONE | 57 READ_MESSAGE_FLAG_NONE = c_core.MOJO_READ_MESSAGE_FLAG_NONE |
58 READ_MESSAGE_FLAG_MAY_DISCARD = c_core.MOJO_READ_MESSAGE_FLAG_MAY_DISCARD | 58 READ_MESSAGE_FLAG_MAY_DISCARD = c_core.MOJO_READ_MESSAGE_FLAG_MAY_DISCARD |
59 WRITE_DATA_FLAG_NONE = c_core.MOJO_WRITE_DATA_FLAG_NONE | 59 WRITE_DATA_FLAG_NONE = c_core.MOJO_WRITE_DATA_FLAG_NONE |
60 WRITE_DATA_FLAG_ALL_OR_NONE = c_core.MOJO_WRITE_DATA_FLAG_ALL_OR_NONE | 60 WRITE_DATA_FLAG_ALL_OR_NONE = c_core.MOJO_WRITE_DATA_FLAG_ALL_OR_NONE |
61 READ_DATA_FLAG_NONE = c_core.MOJO_READ_DATA_FLAG_NONE | 61 READ_DATA_FLAG_NONE = c_core.MOJO_READ_DATA_FLAG_NONE |
62 READ_DATA_FLAG_ALL_OR_NONE = c_core.MOJO_READ_DATA_FLAG_ALL_OR_NONE | 62 READ_DATA_FLAG_ALL_OR_NONE = c_core.MOJO_READ_DATA_FLAG_ALL_OR_NONE |
63 READ_DATA_FLAG_DISCARD = c_core.MOJO_READ_DATA_FLAG_DISCARD | 63 READ_DATA_FLAG_DISCARD = c_core.MOJO_READ_DATA_FLAG_DISCARD |
64 READ_DATA_FLAG_QUERY = c_core.MOJO_READ_DATA_FLAG_QUERY | 64 READ_DATA_FLAG_QUERY = c_core.MOJO_READ_DATA_FLAG_QUERY |
| 65 READ_DATA_FLAG_PEEK = c_core.MOJO_READ_DATA_FLAG_PEEK |
65 MAP_BUFFER_FLAG_NONE = c_core.MOJO_MAP_BUFFER_FLAG_NONE | 66 MAP_BUFFER_FLAG_NONE = c_core.MOJO_MAP_BUFFER_FLAG_NONE |
66 | 67 |
67 def GetTimeTicksNow(): | 68 def GetTimeTicksNow(): |
68 """Monotonically increasing tick count representing "right now." | 69 """Monotonically increasing tick count representing "right now." |
69 | 70 |
70 See mojo/public/c/system/functions.h | 71 See mojo/public/c/system/functions.h |
71 """ | 72 """ |
72 return c_core.MojoGetTimeTicksNow() | 73 return c_core.MojoGetTimeTicksNow() |
73 | 74 |
74 cdef class _ScopedMemory: | 75 cdef class _ScopedMemory: |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 """ | 769 """ |
769 Post a task on the runloop. This must be called from the thread owning the | 770 Post a task on the runloop. This must be called from the thread owning the |
770 runloop. | 771 runloop. |
771 """ | 772 """ |
772 cdef c_environment.CClosure closure = c_environment.BuildClosure(runnable) | 773 cdef c_environment.CClosure closure = c_environment.BuildClosure(runnable) |
773 self.c_run_loop.PostDelayedTask(closure, delay) | 774 self.c_run_loop.PostDelayedTask(closure, delay) |
774 | 775 |
775 | 776 |
776 cdef c_environment.CEnvironment* _ENVIRONMENT = new c_environment.CEnvironment() | 777 cdef c_environment.CEnvironment* _ENVIRONMENT = new c_environment.CEnvironment() |
777 cdef c_environment.PythonAsyncWaiter* _ASYNC_WAITER = new c_environment.PythonAs
yncWaiter() | 778 cdef c_environment.PythonAsyncWaiter* _ASYNC_WAITER = new c_environment.PythonAs
yncWaiter() |
OLD | NEW |