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_PROXY_H_ | 5 #ifndef IPC_IPC_CHANNEL_PROXY_H_ |
6 #define IPC_IPC_CHANNEL_PROXY_H_ | 6 #define IPC_IPC_CHANNEL_PROXY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Called to clear the pointer to the IPC task runner when it's going away. | 115 // Called to clear the pointer to the IPC task runner when it's going away. |
116 void ClearIPCTaskRunner(); | 116 void ClearIPCTaskRunner(); |
117 | 117 |
118 // Get the process ID for the connected peer. | 118 // Get the process ID for the connected peer. |
119 // Returns base::kNullProcessId if the peer is not connected yet. | 119 // Returns base::kNullProcessId if the peer is not connected yet. |
120 base::ProcessId GetPeerPID() const { return context_->peer_pid_; } | 120 base::ProcessId GetPeerPID() const { return context_->peer_pid_; } |
121 | 121 |
122 #if defined(OS_POSIX) && !defined(OS_NACL) | 122 #if defined(OS_POSIX) && !defined(OS_NACL) |
123 // Calls through to the underlying channel's methods. | 123 // Calls through to the underlying channel's methods. |
124 int GetClientFileDescriptor(); | 124 int GetClientFileDescriptor(); |
125 int TakeClientFileDescriptor(); | 125 base::ScopedFD TakeClientFileDescriptor(); |
126 #endif // defined(OS_POSIX) | 126 #endif // defined(OS_POSIX) |
127 | 127 |
128 protected: | 128 protected: |
129 class Context; | 129 class Context; |
130 // A subclass uses this constructor if it needs to add more information | 130 // A subclass uses this constructor if it needs to add more information |
131 // to the internal state. | 131 // to the internal state. |
132 ChannelProxy(Context* context); | 132 ChannelProxy(Context* context); |
133 | 133 |
134 ChannelProxy( | 134 ChannelProxy( |
135 Listener* listener, | 135 Listener* listener, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // that involves this data. | 232 // that involves this data. |
233 scoped_refptr<Context> context_; | 233 scoped_refptr<Context> context_; |
234 | 234 |
235 // Whether the channel has been initialized. | 235 // Whether the channel has been initialized. |
236 bool did_init_; | 236 bool did_init_; |
237 }; | 237 }; |
238 | 238 |
239 } // namespace IPC | 239 } // namespace IPC |
240 | 240 |
241 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 241 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |