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

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

Issue 2750373002: Revert of Mojo: Armed Watchers (Closed)
Patch Set: 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
« no previous file with comments | « mojo/edk/system/awakable_list.cc ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
31 #include "mojo/public/cpp/system/message_pipe.h" 30 #include "mojo/public/cpp/system/message_pipe.h"
32 31
33 namespace base { 32 namespace base {
34 class PortProvider; 33 class PortProvider;
35 } 34 }
36 35
37 namespace mojo { 36 namespace mojo {
38 namespace edk { 37 namespace edk {
39 38
40 // |Core| is an object that implements the Mojo system calls. All public methods 39 // |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
139 MojoResult Wait(MojoHandle handle, 138 MojoResult Wait(MojoHandle handle,
140 MojoHandleSignals signals, 139 MojoHandleSignals signals,
141 MojoDeadline deadline, 140 MojoDeadline deadline,
142 MojoHandleSignalsState* signals_state); 141 MojoHandleSignalsState* signals_state);
143 MojoResult WaitMany(const MojoHandle* handles, 142 MojoResult WaitMany(const MojoHandle* handles,
144 const MojoHandleSignals* signals, 143 const MojoHandleSignals* signals,
145 uint32_t num_handles, 144 uint32_t num_handles,
146 MojoDeadline deadline, 145 MojoDeadline deadline,
147 uint32_t* result_index, 146 uint32_t* result_index,
148 MojoHandleSignalsState* signals_states); 147 MojoHandleSignalsState* signals_states);
149 MojoResult CreateWatcher(MojoWatcherCallback callback, 148 MojoResult Watch(MojoHandle handle,
150 MojoHandle* watcher_handle);
151 MojoResult Watch(MojoHandle watcher_handle,
152 MojoHandle handle,
153 MojoHandleSignals signals, 149 MojoHandleSignals signals,
150 MojoWatchCallback callback,
154 uintptr_t context); 151 uintptr_t context);
155 MojoResult CancelWatch(MojoHandle watcher_handle, uintptr_t context); 152 MojoResult CancelWatch(MojoHandle 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);
161 MojoResult AllocMessage(uint32_t num_bytes, 153 MojoResult AllocMessage(uint32_t num_bytes,
162 const MojoHandle* handles, 154 const MojoHandle* handles,
163 uint32_t num_handles, 155 uint32_t num_handles,
164 MojoAllocMessageFlags flags, 156 MojoAllocMessageFlags flags,
165 MojoMessageHandle* message); 157 MojoMessageHandle* message);
166 MojoResult FreeMessage(MojoMessageHandle message); 158 MojoResult FreeMessage(MojoMessageHandle message);
167 MojoResult GetMessageBuffer(MojoMessageHandle message, void** buffer); 159 MojoResult GetMessageBuffer(MojoMessageHandle message, void** buffer);
168 MojoResult GetProperty(MojoPropertyType type, void* value); 160 MojoResult GetProperty(MojoPropertyType type, void* value);
169 161
170 // These methods correspond to the API functions defined in 162 // These methods correspond to the API functions defined in
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 // Properties that can be read using the MojoGetProperty() API. 309 // Properties that can be read using the MojoGetProperty() API.
318 bool property_sync_call_allowed_ = true; 310 bool property_sync_call_allowed_ = true;
319 311
320 DISALLOW_COPY_AND_ASSIGN(Core); 312 DISALLOW_COPY_AND_ASSIGN(Core);
321 }; 313 };
322 314
323 } // namespace edk 315 } // namespace edk
324 } // namespace mojo 316 } // namespace mojo
325 317
326 #endif // MOJO_EDK_SYSTEM_CORE_H_ 318 #endif // MOJO_EDK_SYSTEM_CORE_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/awakable_list.cc ('k') | mojo/edk/system/core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698