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

Side by Side Diff: ipc/mojo/ipc_channel_mojo.h

Issue 583473002: IPC: Get rid of FileDescriptor usage from FileDescriptorSet and Message (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « ipc/ipc_message_utils.cc ('k') | ipc/mojo/ipc_channel_mojo.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 IPC_IPC_CHANNEL_MOJO_H_ 5 #ifndef IPC_IPC_CHANNEL_MOJO_H_
6 #define IPC_IPC_CHANNEL_MOJO_H_ 6 #define IPC_IPC_CHANNEL_MOJO_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 #if defined(OS_POSIX) && !defined(OS_NACL) 81 #if defined(OS_POSIX) && !defined(OS_NACL)
82 virtual int GetClientFileDescriptor() const OVERRIDE; 82 virtual int GetClientFileDescriptor() const OVERRIDE;
83 virtual int TakeClientFileDescriptor() OVERRIDE; 83 virtual int TakeClientFileDescriptor() OVERRIDE;
84 84
85 // These access protected API of IPC::Message, which has ChannelMojo 85 // These access protected API of IPC::Message, which has ChannelMojo
86 // as a friend class. 86 // as a friend class.
87 static MojoResult WriteToFileDescriptorSet( 87 static MojoResult WriteToFileDescriptorSet(
88 const std::vector<MojoHandle>& handle_buffer, 88 const std::vector<MojoHandle>& handle_buffer,
89 Message* message); 89 Message* message);
90 static MojoResult ReadFromFileDescriptorSet(const Message& message, 90 static MojoResult ReadFromFileDescriptorSet(Message* message,
91 std::vector<MojoHandle>* handles); 91 std::vector<MojoHandle>* handles);
92 92
93 #endif // defined(OS_POSIX) && !defined(OS_NACL) 93 #endif // defined(OS_POSIX) && !defined(OS_NACL)
94 94
95 // Called from MessagePipeReader implementations 95 // Called from MessagePipeReader implementations
96 void OnMessageReceived(Message& message); 96 void OnMessageReceived(Message& message);
97 void OnConnected(mojo::ScopedMessagePipeHandle pipe); 97 void OnConnected(mojo::ScopedMessagePipeHandle pipe);
98 void OnPipeClosed(internal::MessagePipeReader* reader); 98 void OnPipeClosed(internal::MessagePipeReader* reader);
99 void OnPipeError(internal::MessagePipeReader* reader); 99 void OnPipeError(internal::MessagePipeReader* reader);
100 void set_peer_pid(base::ProcessId pid) { peer_pid_ = pid; } 100 void set_peer_pid(base::ProcessId pid) { peer_pid_ = pid; }
(...skipping 28 matching lines...) Expand all
129 ScopedVector<Message> pending_messages_; 129 ScopedVector<Message> pending_messages_;
130 130
131 base::WeakPtrFactory<ChannelMojo> weak_factory_; 131 base::WeakPtrFactory<ChannelMojo> weak_factory_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); 133 DISALLOW_COPY_AND_ASSIGN(ChannelMojo);
134 }; 134 };
135 135
136 } // namespace IPC 136 } // namespace IPC
137 137
138 #endif // IPC_IPC_CHANNEL_MOJO_H_ 138 #endif // IPC_IPC_CHANNEL_MOJO_H_
OLDNEW
« no previous file with comments | « ipc/ipc_message_utils.cc ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698