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

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

Issue 866223005: IPC: Add MojoHandleAttachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing windows build again... Created 5 years, 10 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/mojo/BUILD.gn ('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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // Channel implementation 85 // Channel implementation
86 bool Connect() override; 86 bool Connect() override;
87 void Close() override; 87 void Close() override;
88 bool Send(Message* message) override; 88 bool Send(Message* message) override;
89 base::ProcessId GetPeerPID() const override; 89 base::ProcessId GetPeerPID() const override;
90 base::ProcessId GetSelfPID() const override; 90 base::ProcessId GetSelfPID() const override;
91 91
92 #if defined(OS_POSIX) && !defined(OS_NACL) 92 #if defined(OS_POSIX) && !defined(OS_NACL)
93 int GetClientFileDescriptor() const override; 93 int GetClientFileDescriptor() const override;
94 base::ScopedFD TakeClientFileDescriptor() override; 94 base::ScopedFD TakeClientFileDescriptor() override;
95 #endif // defined(OS_POSIX) && !defined(OS_NACL)
95 96
96 // These access protected API of IPC::Message, which has ChannelMojo 97 // These access protected API of IPC::Message, which has ChannelMojo
97 // as a friend class. 98 // as a friend class.
98 static MojoResult WriteToMessageAttachmentSet( 99 static MojoResult WriteToMessageAttachmentSet(
99 const std::vector<MojoHandle>& handle_buffer, 100 const std::vector<MojoHandle>& handle_buffer,
100 Message* message); 101 Message* message);
101 static MojoResult ReadFromMessageAttachmentSet( 102 static MojoResult ReadFromMessageAttachmentSet(
102 Message* message, 103 Message* message,
103 std::vector<MojoHandle>* handles); 104 std::vector<MojoHandle>* handles);
104 105
105 #endif // defined(OS_POSIX) && !defined(OS_NACL)
106
107 // MojoBootstrapDelegate implementation 106 // MojoBootstrapDelegate implementation
108 void OnBootstrapError() override; 107 void OnBootstrapError() override;
109 108
110 // MessagePipeReader::Delegate 109 // MessagePipeReader::Delegate
111 void OnMessageReceived(Message& message) override; 110 void OnMessageReceived(Message& message) override;
112 void OnPipeClosed(internal::MessagePipeReader* reader) override; 111 void OnPipeClosed(internal::MessagePipeReader* reader) override;
113 void OnPipeError(internal::MessagePipeReader* reader) override; 112 void OnPipeError(internal::MessagePipeReader* reader) override;
114 113
115 protected: 114 protected:
116 ChannelMojo(Delegate* delegate, 115 ChannelMojo(Delegate* delegate,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 ScopedVector<Message> pending_messages_; 148 ScopedVector<Message> pending_messages_;
150 149
151 base::WeakPtrFactory<ChannelMojo> weak_factory_; 150 base::WeakPtrFactory<ChannelMojo> weak_factory_;
152 151
153 DISALLOW_COPY_AND_ASSIGN(ChannelMojo); 152 DISALLOW_COPY_AND_ASSIGN(ChannelMojo);
154 }; 153 };
155 154
156 } // namespace IPC 155 } // namespace IPC
157 156
158 #endif // IPC_IPC_CHANNEL_MOJO_H_ 157 #endif // IPC_IPC_CHANNEL_MOJO_H_
OLDNEW
« no previous file with comments | « ipc/mojo/BUILD.gn ('k') | ipc/mojo/ipc_channel_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698