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

Side by Side Diff: mojo/edk/system/dispatcher.cc

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 #include "mojo/edk/system/dispatcher.h" 5 #include "mojo/edk/system/dispatcher.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "mojo/edk/system/configuration.h" 8 #include "mojo/edk/system/configuration.h"
9 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h" 9 #include "mojo/edk/system/data_pipe_consumer_dispatcher.h"
10 #include "mojo/edk/system/data_pipe_producer_dispatcher.h" 10 #include "mojo/edk/system/data_pipe_producer_dispatcher.h"
11 #include "mojo/edk/system/message_pipe_dispatcher.h" 11 #include "mojo/edk/system/message_pipe_dispatcher.h"
12 #include "mojo/edk/system/platform_handle_dispatcher.h" 12 #include "mojo/edk/system/platform_handle_dispatcher.h"
13 #include "mojo/edk/system/shared_buffer_dispatcher.h" 13 #include "mojo/edk/system/shared_buffer_dispatcher.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 namespace edk { 16 namespace edk {
17 17
18 Dispatcher::DispatcherInTransit::DispatcherInTransit() {} 18 Dispatcher::DispatcherInTransit::DispatcherInTransit() {}
19 19
20 Dispatcher::DispatcherInTransit::DispatcherInTransit( 20 Dispatcher::DispatcherInTransit::DispatcherInTransit(
21 const DispatcherInTransit& other) = default; 21 const DispatcherInTransit& other) = default;
22 22
23 Dispatcher::DispatcherInTransit::~DispatcherInTransit() {} 23 Dispatcher::DispatcherInTransit::~DispatcherInTransit() {}
24 24
25 MojoResult Dispatcher::Watch(MojoHandleSignals signals, 25 MojoResult Dispatcher::WatchDispatcher(scoped_refptr<Dispatcher> dispatcher,
26 const Watcher::WatchCallback& callback, 26 MojoHandleSignals signals,
27 uintptr_t context) { 27 uintptr_t context) {
28 return MOJO_RESULT_INVALID_ARGUMENT; 28 return MOJO_RESULT_INVALID_ARGUMENT;
29 } 29 }
30 30
31 MojoResult Dispatcher::CancelWatch(uintptr_t context) { 31 MojoResult Dispatcher::CancelWatch(uintptr_t context) {
32 return MOJO_RESULT_INVALID_ARGUMENT; 32 return MOJO_RESULT_INVALID_ARGUMENT;
33 } 33 }
34 34
35 MojoResult Dispatcher::Arm(uint32_t* num_ready_contexts,
36 uintptr_t* ready_contexts,
37 MojoResult* ready_results,
38 MojoHandleSignalsState* ready_signals_states) {
39 return MOJO_RESULT_INVALID_ARGUMENT;
40 }
41
35 MojoResult Dispatcher::WriteMessage(std::unique_ptr<MessageForTransit> message, 42 MojoResult Dispatcher::WriteMessage(std::unique_ptr<MessageForTransit> message,
36 MojoWriteMessageFlags flags) { 43 MojoWriteMessageFlags flags) {
37 return MOJO_RESULT_INVALID_ARGUMENT; 44 return MOJO_RESULT_INVALID_ARGUMENT;
38 } 45 }
39 46
40 MojoResult Dispatcher::ReadMessage(std::unique_ptr<MessageForTransit>* message, 47 MojoResult Dispatcher::ReadMessage(std::unique_ptr<MessageForTransit>* message,
41 uint32_t* num_bytes, 48 uint32_t* num_bytes,
42 MojoHandle* handles, 49 MojoHandle* handles,
43 uint32_t* num_handles, 50 uint32_t* num_handles,
44 MojoReadMessageFlags flags, 51 MojoReadMessageFlags flags,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 DispatcherVector* dispatchers, 115 DispatcherVector* dispatchers,
109 MojoResult* results, 116 MojoResult* results,
110 uintptr_t* contexts) { 117 uintptr_t* contexts) {
111 return MOJO_RESULT_INVALID_ARGUMENT; 118 return MOJO_RESULT_INVALID_ARGUMENT;
112 } 119 }
113 120
114 HandleSignalsState Dispatcher::GetHandleSignalsState() const { 121 HandleSignalsState Dispatcher::GetHandleSignalsState() const {
115 return HandleSignalsState(); 122 return HandleSignalsState();
116 } 123 }
117 124
125 MojoResult Dispatcher::AddWatcherRef(
126 const scoped_refptr<WatcherDispatcher>& watcher,
127 uintptr_t context) {
128 return MOJO_RESULT_INVALID_ARGUMENT;
129 }
130
131 MojoResult Dispatcher::RemoveWatcherRef(WatcherDispatcher* watcher,
132 uintptr_t context) {
133 return MOJO_RESULT_INVALID_ARGUMENT;
134 }
135
118 MojoResult Dispatcher::AddAwakable(Awakable* awakable, 136 MojoResult Dispatcher::AddAwakable(Awakable* awakable,
119 MojoHandleSignals signals, 137 MojoHandleSignals signals,
120 uintptr_t context, 138 uintptr_t context,
121 HandleSignalsState* signals_state) { 139 HandleSignalsState* signals_state) {
122 return MOJO_RESULT_INVALID_ARGUMENT; 140 return MOJO_RESULT_INVALID_ARGUMENT;
123 } 141 }
124 142
125 void Dispatcher::RemoveAwakable(Awakable* awakable, 143 void Dispatcher::RemoveAwakable(Awakable* awakable,
126 HandleSignalsState* handle_signals_state) { 144 HandleSignalsState* handle_signals_state) {
127 NOTREACHED(); 145 NOTREACHED();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return nullptr; 201 return nullptr;
184 } 202 }
185 } 203 }
186 204
187 Dispatcher::Dispatcher() {} 205 Dispatcher::Dispatcher() {}
188 206
189 Dispatcher::~Dispatcher() {} 207 Dispatcher::~Dispatcher() {}
190 208
191 } // namespace edk 209 } // namespace edk
192 } // namespace mojo 210 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698