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

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

Issue 277083003: Mojo: (Theoretically) implement the read side of platform handle passing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asdf Created 6 years, 7 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/mojo.gyp ('k') | mojo/system/channel.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_CHANNEL_H_ 5 #ifndef MOJO_SYSTEM_CHANNEL_H_
6 #define MOJO_SYSTEM_CHANNEL_H_ 6 #define MOJO_SYSTEM_CHANNEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 friend class base::RefCountedThreadSafe<Channel>; 141 friend class base::RefCountedThreadSafe<Channel>;
142 virtual ~Channel(); 142 virtual ~Channel();
143 143
144 // |RawChannel::Delegate| implementation: 144 // |RawChannel::Delegate| implementation:
145 virtual void OnReadMessage( 145 virtual void OnReadMessage(
146 const MessageInTransit::View& message_view) OVERRIDE; 146 const MessageInTransit::View& message_view) OVERRIDE;
147 virtual void OnFatalError(FatalError fatal_error) OVERRIDE; 147 virtual void OnFatalError(FatalError fatal_error) OVERRIDE;
148 148
149 // Helpers for |OnReadMessage|: 149 // Helpers for |OnReadMessage|:
150 bool ValidateReadMessage(const MessageInTransit::View& message_view);
151 void OnReadMessageForDownstream(const MessageInTransit::View& message_view); 150 void OnReadMessageForDownstream(const MessageInTransit::View& message_view);
152 void OnReadMessageForChannel(const MessageInTransit::View& message_view); 151 void OnReadMessageForChannel(const MessageInTransit::View& message_view);
153 152
154 // Removes the message pipe endpoint with the given local ID, which must exist 153 // Removes the message pipe endpoint with the given local ID, which must exist
155 // and be a zombie, and given remote ID. Returns false on failure, in 154 // and be a zombie, and given remote ID. Returns false on failure, in
156 // particular if no message pipe with |local_id| is attached. 155 // particular if no message pipe with |local_id| is attached.
157 bool RemoveMessagePipeEndpoint(MessageInTransit::EndpointId local_id, 156 bool RemoveMessagePipeEndpoint(MessageInTransit::EndpointId local_id,
158 MessageInTransit::EndpointId remote_id); 157 MessageInTransit::EndpointId remote_id);
159 158
160 // Handles errors (e.g., invalid messages) from the remote side. 159 // Handles errors (e.g., invalid messages) from the remote side.
(...skipping 28 matching lines...) Expand all
189 // be checked for existence before use. 188 // be checked for existence before use.
190 MessageInTransit::EndpointId next_local_id_; 189 MessageInTransit::EndpointId next_local_id_;
191 190
192 DISALLOW_COPY_AND_ASSIGN(Channel); 191 DISALLOW_COPY_AND_ASSIGN(Channel);
193 }; 192 };
194 193
195 } // namespace system 194 } // namespace system
196 } // namespace mojo 195 } // namespace mojo
197 196
198 #endif // MOJO_SYSTEM_CHANNEL_H_ 197 #endif // MOJO_SYSTEM_CHANNEL_H_
OLDNEW
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/system/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698