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

Side by Side Diff: mojo/system/message_pipe.h

Issue 419973005: Convert WriteMessage...() to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « mojo/system/message_in_transit.cc ('k') | mojo/system/message_pipe.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_SYSTEM_MESSAGE_PIPE_H_ 5 #ifndef MOJO_SYSTEM_MESSAGE_PIPE_H_
6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_ 6 #define MOJO_SYSTEM_MESSAGE_PIPE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Gets the type of the endpoint (used for assertions, etc.). 46 // Gets the type of the endpoint (used for assertions, etc.).
47 MessagePipeEndpoint::Type GetType(unsigned port); 47 MessagePipeEndpoint::Type GetType(unsigned port);
48 48
49 // These are called by the dispatcher to implement its methods of 49 // These are called by the dispatcher to implement its methods of
50 // corresponding names. In all cases, the port |port| must be open. 50 // corresponding names. In all cases, the port |port| must be open.
51 void CancelAllWaiters(unsigned port); 51 void CancelAllWaiters(unsigned port);
52 void Close(unsigned port); 52 void Close(unsigned port);
53 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its 53 // Unlike |MessagePipeDispatcher::WriteMessage()|, this does not validate its
54 // arguments. 54 // arguments.
55 MojoResult WriteMessage(unsigned port, 55 MojoResult WriteMessage(unsigned port,
56 const void* bytes, 56 UserPointer<const void> bytes,
57 uint32_t num_bytes, 57 uint32_t num_bytes,
58 std::vector<DispatcherTransport>* transports, 58 std::vector<DispatcherTransport>* transports,
59 MojoWriteMessageFlags flags); 59 MojoWriteMessageFlags flags);
60 MojoResult ReadMessage(unsigned port, 60 MojoResult ReadMessage(unsigned port,
61 UserPointer<void> bytes, 61 UserPointer<void> bytes,
62 UserPointer<uint32_t> num_bytes, 62 UserPointer<uint32_t> num_bytes,
63 DispatcherVector* dispatchers, 63 DispatcherVector* dispatchers,
64 uint32_t* num_dispatchers, 64 uint32_t* num_dispatchers,
65 MojoReadMessageFlags flags); 65 MojoReadMessageFlags flags);
66 MojoResult AddWaiter(unsigned port, 66 MojoResult AddWaiter(unsigned port,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 base::Lock lock_; // Protects the following members. 112 base::Lock lock_; // Protects the following members.
113 scoped_ptr<MessagePipeEndpoint> endpoints_[2]; 113 scoped_ptr<MessagePipeEndpoint> endpoints_[2];
114 114
115 DISALLOW_COPY_AND_ASSIGN(MessagePipe); 115 DISALLOW_COPY_AND_ASSIGN(MessagePipe);
116 }; 116 };
117 117
118 } // namespace system 118 } // namespace system
119 } // namespace mojo 119 } // namespace mojo
120 120
121 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_ 121 #endif // MOJO_SYSTEM_MESSAGE_PIPE_H_
OLDNEW
« no previous file with comments | « mojo/system/message_in_transit.cc ('k') | mojo/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698