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

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

Issue 2084593005: Rationalize AddAwakable...() and RemoveAwakable...() methods. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 6 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_MESSAGE_PIPE_ENDPOINT_H_ 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_
6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_ 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // though |MessagePipe|'s implementation may have to do a little more if the 59 // though |MessagePipe|'s implementation may have to do a little more if the
60 // operation involves both endpoints. 60 // operation involves both endpoints.
61 virtual void CancelAllState(); 61 virtual void CancelAllState();
62 virtual MojoResult ReadMessage(UserPointer<void> bytes, 62 virtual MojoResult ReadMessage(UserPointer<void> bytes,
63 UserPointer<uint32_t> num_bytes, 63 UserPointer<uint32_t> num_bytes,
64 HandleVector* handles, 64 HandleVector* handles,
65 uint32_t* num_handles, 65 uint32_t* num_handles,
66 MojoReadMessageFlags flags); 66 MojoReadMessageFlags flags);
67 virtual HandleSignalsState GetHandleSignalsState() const; 67 virtual HandleSignalsState GetHandleSignalsState() const;
68 virtual MojoResult AddAwakable(Awakable* awakable, 68 virtual MojoResult AddAwakable(Awakable* awakable,
69 uint64_t context,
70 bool force,
69 MojoHandleSignals signals, 71 MojoHandleSignals signals,
70 bool force,
71 uint64_t context,
72 HandleSignalsState* signals_state); 72 HandleSignalsState* signals_state);
73 virtual void RemoveAwakable(Awakable* awakable, 73 virtual void RemoveAwakable(bool match_context,
74 Awakable* awakable,
75 uint64_t context,
74 HandleSignalsState* signals_state); 76 HandleSignalsState* signals_state);
75 virtual void RemoveAwakableWithContext(Awakable* awakable,
76 uint64_t context,
77 HandleSignalsState* signals_state);
78 77
79 // Implementations must override these if they represent a proxy endpoint. An 78 // Implementations must override these if they represent a proxy endpoint. An
80 // implementation for a local endpoint needs not override these methods, since 79 // implementation for a local endpoint needs not override these methods, since
81 // they should never be called. 80 // they should never be called.
82 virtual void Attach(ChannelEndpoint* channel_endpoint); 81 virtual void Attach(ChannelEndpoint* channel_endpoint);
83 82
84 protected: 83 protected:
85 MessagePipeEndpoint() {} 84 MessagePipeEndpoint() {}
86 85
87 private: 86 private:
88 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipeEndpoint); 87 MOJO_DISALLOW_COPY_AND_ASSIGN(MessagePipeEndpoint);
89 }; 88 };
90 89
91 } // namespace system 90 } // namespace system
92 } // namespace mojo 91 } // namespace mojo
93 92
94 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_ 93 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_ENDPOINT_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/message_pipe_dispatcher_unittest.cc ('k') | mojo/edk/system/message_pipe_endpoint.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698