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

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

Issue 1748503002: [mojo-edk] Add MojoWatch and MojoCancelWatch APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert RequestContext usage, nits Created 4 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/dispatcher.cc ('k') | mojo/edk/system/message_pipe_dispatcher.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_MESSAGE_PIPE_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <queue> 10 #include <queue>
(...skipping 24 matching lines...) Expand all
35 // as they're passed around. |endpoint| is either 0 or 1 and again is only 35 // as they're passed around. |endpoint| is either 0 or 1 and again is only
36 // used for tracking pipes (one side is always 0, the other is always 1.) 36 // used for tracking pipes (one side is always 0, the other is always 1.)
37 MessagePipeDispatcher(NodeController* node_controller, 37 MessagePipeDispatcher(NodeController* node_controller,
38 const ports::PortRef& port, 38 const ports::PortRef& port,
39 uint64_t pipe_id, 39 uint64_t pipe_id,
40 int endpoint); 40 int endpoint);
41 41
42 // Dispatcher: 42 // Dispatcher:
43 Type GetType() const override; 43 Type GetType() const override;
44 MojoResult Close() override; 44 MojoResult Close() override;
45 MojoResult Watch(MojoHandleSignals signals,
46 const Watcher::WatchCallback& callback,
47 uintptr_t context) override;
48 MojoResult CancelWatch(uintptr_t context) override;
45 MojoResult WriteMessage(const void* bytes, 49 MojoResult WriteMessage(const void* bytes,
46 uint32_t num_bytes, 50 uint32_t num_bytes,
47 const DispatcherInTransit* dispatchers, 51 const DispatcherInTransit* dispatchers,
48 uint32_t num_dispatchers, 52 uint32_t num_dispatchers,
49 MojoWriteMessageFlags flags) override; 53 MojoWriteMessageFlags flags) override;
50 MojoResult ReadMessage(void* bytes, 54 MojoResult ReadMessage(void* bytes,
51 uint32_t* num_bytes, 55 uint32_t* num_bytes,
52 MojoHandle* handles, 56 MojoHandle* handles,
53 uint32_t* num_handles, 57 uint32_t* num_handles,
54 MojoReadMessageFlags flags) override; 58 MojoReadMessageFlags flags) override;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 bool port_closed_ = false; 108 bool port_closed_ = false;
105 AwakableList awakables_; 109 AwakableList awakables_;
106 110
107 DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher); 111 DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher);
108 }; 112 };
109 113
110 } // namespace edk 114 } // namespace edk
111 } // namespace mojo 115 } // namespace mojo
112 116
113 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ 117 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/dispatcher.cc ('k') | mojo/edk/system/message_pipe_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698