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 | |
66 MAP_BUFFER_FLAG_NONE = c_core.MOJO_MAP_BUFFER_FLAG_NONE | 65 MAP_BUFFER_FLAG_NONE = c_core.MOJO_MAP_BUFFER_FLAG_NONE |
67 | 66 |
68 def GetTimeTicksNow(): | 67 def GetTimeTicksNow(): |
69 """Monotonically increasing tick count representing "right now." | 68 """Monotonically increasing tick count representing "right now." |
70 | 69 |
71 See mojo/public/c/system/functions.h | 70 See mojo/public/c/system/functions.h |
72 """ | 71 """ |
73 return c_core.MojoGetTimeTicksNow() | 72 return c_core.MojoGetTimeTicksNow() |
74 | 73 |
75 cdef class _ScopedMemory: | 74 cdef class _ScopedMemory: |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 """ | 768 """ |
770 Post a task on the runloop. This must be called from the thread owning the | 769 Post a task on the runloop. This must be called from the thread owning the |
771 runloop. | 770 runloop. |
772 """ | 771 """ |
773 cdef c_environment.CClosure closure = c_environment.BuildClosure(runnable) | 772 cdef c_environment.CClosure closure = c_environment.BuildClosure(runnable) |
774 self.c_run_loop.PostDelayedTask(closure, delay) | 773 self.c_run_loop.PostDelayedTask(closure, delay) |
775 | 774 |
776 | 775 |
777 cdef c_environment.CEnvironment* _ENVIRONMENT = new c_environment.CEnvironment() | 776 cdef c_environment.CEnvironment* _ENVIRONMENT = new c_environment.CEnvironment() |
778 cdef c_environment.PythonAsyncWaiter* _ASYNC_WAITER = new c_environment.PythonAs
yncWaiter() | 777 cdef c_environment.PythonAsyncWaiter* _ASYNC_WAITER = new c_environment.PythonAs
yncWaiter() |
OLD | NEW |