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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void AddFilter(MessageFilter* filter); | 112 void AddFilter(MessageFilter* filter); |
113 void RemoveFilter(MessageFilter* filter); | 113 void RemoveFilter(MessageFilter* filter); |
114 | 114 |
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) && \ | 122 #if defined(OS_POSIX) && !defined(OS_NACL_SFI) |
123 (!defined(OS_NACL) || defined(__native_client_nonsfi__)) | |
124 // Calls through to the underlying channel's methods. | 123 // Calls through to the underlying channel's methods. |
125 int GetClientFileDescriptor(); | 124 int GetClientFileDescriptor(); |
126 base::ScopedFD TakeClientFileDescriptor(); | 125 base::ScopedFD TakeClientFileDescriptor(); |
127 #endif | 126 #endif |
128 | 127 |
129 protected: | 128 protected: |
130 class Context; | 129 class Context; |
131 // 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 |
132 // to the internal state. | 131 // to the internal state. |
133 ChannelProxy(Context* context); | 132 ChannelProxy(Context* context); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // that involves this data. | 232 // that involves this data. |
234 scoped_refptr<Context> context_; | 233 scoped_refptr<Context> context_; |
235 | 234 |
236 // Whether the channel has been initialized. | 235 // Whether the channel has been initialized. |
237 bool did_init_; | 236 bool did_init_; |
238 }; | 237 }; |
239 | 238 |
240 } // namespace IPC | 239 } // namespace IPC |
241 | 240 |
242 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 241 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |