Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: mojo/edk/system/core.h

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef MOJO_EDK_SYSTEM_CORE_H_ 5 #ifndef MOJO_EDK_SYSTEM_CORE_H_
6 #define MOJO_EDK_SYSTEM_CORE_H_ 6 #define MOJO_EDK_SYSTEM_CORE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/shared_memory_handle.h" 15 #include "base/memory/shared_memory_handle.h"
16 #include "base/synchronization/lock.h" 16 #include "base/synchronization/lock.h"
17 #include "base/task_runner.h" 17 #include "base/task_runner.h"
18 #include "mojo/edk/embedder/scoped_platform_handle.h" 18 #include "mojo/edk/embedder/scoped_platform_handle.h"
19 #include "mojo/edk/system/dispatcher.h" 19 #include "mojo/edk/system/dispatcher.h"
20 #include "mojo/edk/system/handle_signals_state.h" 20 #include "mojo/edk/system/handle_signals_state.h"
21 #include "mojo/edk/system/handle_table.h" 21 #include "mojo/edk/system/handle_table.h"
22 #include "mojo/edk/system/mapping_table.h" 22 #include "mojo/edk/system/mapping_table.h"
23 #include "mojo/edk/system/node_controller.h" 23 #include "mojo/edk/system/node_controller.h"
24 #include "mojo/edk/system/system_impl_export.h" 24 #include "mojo/edk/system/system_impl_export.h"
25 #include "mojo/public/c/system/buffer.h" 25 #include "mojo/public/c/system/buffer.h"
26 #include "mojo/public/c/system/data_pipe.h" 26 #include "mojo/public/c/system/data_pipe.h"
27 #include "mojo/public/c/system/message_pipe.h" 27 #include "mojo/public/c/system/message_pipe.h"
28 #include "mojo/public/c/system/platform_handle.h" 28 #include "mojo/public/c/system/platform_handle.h"
29 #include "mojo/public/c/system/types.h" 29 #include "mojo/public/c/system/types.h"
30 #include "mojo/public/c/system/watcher.h"
30 #include "mojo/public/cpp/system/message_pipe.h" 31 #include "mojo/public/cpp/system/message_pipe.h"
31 32
32 namespace base { 33 namespace base {
33 class PortProvider; 34 class PortProvider;
34 } 35 }
35 36
36 namespace mojo { 37 namespace mojo {
37 namespace edk { 38 namespace edk {
38 39
39 // |Core| is an object that implements the Mojo system calls. All public methods 40 // |Core| is an object that implements the Mojo system calls. All public methods
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 MojoResult Wait(MojoHandle handle, 139 MojoResult Wait(MojoHandle handle,
139 MojoHandleSignals signals, 140 MojoHandleSignals signals,
140 MojoDeadline deadline, 141 MojoDeadline deadline,
141 MojoHandleSignalsState* signals_state); 142 MojoHandleSignalsState* signals_state);
142 MojoResult WaitMany(const MojoHandle* handles, 143 MojoResult WaitMany(const MojoHandle* handles,
143 const MojoHandleSignals* signals, 144 const MojoHandleSignals* signals,
144 uint32_t num_handles, 145 uint32_t num_handles,
145 MojoDeadline deadline, 146 MojoDeadline deadline,
146 uint32_t* result_index, 147 uint32_t* result_index,
147 MojoHandleSignalsState* signals_states); 148 MojoHandleSignalsState* signals_states);
148 MojoResult Watch(MojoHandle handle, 149 MojoResult CreateWatcher(MojoWatcherCallback callback,
150 MojoHandle* watcher_handle);
151 MojoResult Watch(MojoHandle watcher_handle,
152 MojoHandle handle,
149 MojoHandleSignals signals, 153 MojoHandleSignals signals,
150 MojoWatchCallback callback,
151 uintptr_t context); 154 uintptr_t context);
152 MojoResult CancelWatch(MojoHandle handle, uintptr_t context); 155 MojoResult CancelWatch(MojoHandle watcher_handle, uintptr_t context);
156 MojoResult ArmWatcher(MojoHandle watcher_handle,
157 uint32_t* num_ready_contexts,
158 uintptr_t* ready_contexts,
159 MojoResult* ready_results,
160 MojoHandleSignalsState* ready_signals_states);
153 MojoResult AllocMessage(uint32_t num_bytes, 161 MojoResult AllocMessage(uint32_t num_bytes,
154 const MojoHandle* handles, 162 const MojoHandle* handles,
155 uint32_t num_handles, 163 uint32_t num_handles,
156 MojoAllocMessageFlags flags, 164 MojoAllocMessageFlags flags,
157 MojoMessageHandle* message); 165 MojoMessageHandle* message);
158 MojoResult FreeMessage(MojoMessageHandle message); 166 MojoResult FreeMessage(MojoMessageHandle message);
159 MojoResult GetMessageBuffer(MojoMessageHandle message, void** buffer); 167 MojoResult GetMessageBuffer(MojoMessageHandle message, void** buffer);
160 MojoResult GetProperty(MojoPropertyType type, void* value); 168 MojoResult GetProperty(MojoPropertyType type, void* value);
161 169
162 // These methods correspond to the API functions defined in 170 // These methods correspond to the API functions defined in
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // Properties that can be read using the MojoGetProperty() API. 317 // Properties that can be read using the MojoGetProperty() API.
310 bool property_sync_call_allowed_ = true; 318 bool property_sync_call_allowed_ = true;
311 319
312 DISALLOW_COPY_AND_ASSIGN(Core); 320 DISALLOW_COPY_AND_ASSIGN(Core);
313 }; 321 };
314 322
315 } // namespace edk 323 } // namespace edk
316 } // namespace mojo 324 } // namespace mojo
317 325
318 #endif // MOJO_EDK_SYSTEM_CORE_H_ 326 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698