OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef IPC_IPC_CHANNEL_H_ |
6 #define IPC_IPC_CHANNEL_H_ | 6 #define IPC_IPC_CHANNEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #if defined(OS_POSIX) | 10 #if defined(OS_POSIX) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 // The caller must then implement their own access-control based on the | 111 // The caller must then implement their own access-control based on the |
112 // client process' user Id. | 112 // client process' user Id. |
113 // - Client and named client: In these mode, the Channel merely | 113 // - Client and named client: In these mode, the Channel merely |
114 // connects to the already established IPC object. | 114 // connects to the already established IPC object. |
115 // | 115 // |
116 // Each mode has its own Create*() API to create the Channel object. | 116 // Each mode has its own Create*() API to create the Channel object. |
117 // | 117 // |
118 // TODO(morrita): Replace CreateByModeForProxy() with one of above Create*(). | 118 // TODO(morrita): Replace CreateByModeForProxy() with one of above Create*(). |
119 // | 119 // |
120 static scoped_ptr<Channel> Create( | 120 static scoped_ptr<Channel> Create( |
121 const IPC::ChannelHandle &channel_handle, Mode mode,Listener* listener); | 121 const IPC::ChannelHandle &channel_handle, Mode mode, Listener* listener); |
122 | 122 |
123 static scoped_ptr<Channel> CreateClient( | 123 static scoped_ptr<Channel> CreateClient( |
124 const IPC::ChannelHandle &channel_handle, Listener* listener); | 124 const IPC::ChannelHandle &channel_handle, Listener* listener); |
125 | 125 |
126 // Channels on Windows are named by default and accessible from other | 126 // Channels on Windows are named by default and accessible from other |
127 // processes. On POSIX channels are anonymous by default and not accessible | 127 // processes. On POSIX channels are anonymous by default and not accessible |
128 // from other processes. Named channels work via named unix domain sockets. | 128 // from other processes. Named channels work via named unix domain sockets. |
129 // On Windows MODE_NAMED_SERVER is equivalent to MODE_SERVER and | 129 // On Windows MODE_NAMED_SERVER is equivalent to MODE_SERVER and |
130 // MODE_NAMED_CLIENT is equivalent to MODE_CLIENT. | 130 // MODE_NAMED_CLIENT is equivalent to MODE_CLIENT. |
131 static scoped_ptr<Channel> CreateNamedServer( | 131 static scoped_ptr<Channel> CreateNamedServer( |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 231 |
232 #if defined(OS_POSIX) | 232 #if defined(OS_POSIX) |
233 // SocketPair() creates a pair of socket FDs suitable for using with | 233 // SocketPair() creates a pair of socket FDs suitable for using with |
234 // IPC::Channel. | 234 // IPC::Channel. |
235 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); | 235 IPC_EXPORT bool SocketPair(int* fd1, int* fd2); |
236 #endif | 236 #endif |
237 | 237 |
238 } // namespace IPC | 238 } // namespace IPC |
239 | 239 |
240 #endif // IPC_IPC_CHANNEL_H_ | 240 #endif // IPC_IPC_CHANNEL_H_ |
OLD | NEW |