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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 // Calls through to the underlying channel's methods. | 181 // Calls through to the underlying channel's methods. |
182 int GetClientFileDescriptor(); | 182 int GetClientFileDescriptor(); |
183 int TakeClientFileDescriptor(); | 183 int TakeClientFileDescriptor(); |
184 bool GetClientEuid(uid_t* client_euid) const; | 184 bool GetClientEuid(uid_t* client_euid) const; |
185 #endif // defined(OS_POSIX) | 185 #endif // defined(OS_POSIX) |
186 | 186 |
187 protected: | 187 protected: |
188 class Context; | 188 class Context; |
189 // A subclass uses this constructor if it needs to add more information | 189 // A subclass uses this constructor if it needs to add more information |
190 // to the internal state. | 190 // to the internal state. |
191 ChannelProxy(Context* context); | 191 explicit ChannelProxy(Context* context); |
192 | 192 |
193 // Used internally to hold state that is referenced on the IPC thread. | 193 // Used internally to hold state that is referenced on the IPC thread. |
194 class Context : public base::RefCountedThreadSafe<Context>, | 194 class Context : public base::RefCountedThreadSafe<Context>, |
195 public Listener { | 195 public Listener { |
196 public: | 196 public: |
197 Context(Listener* listener, base::SingleThreadTaskRunner* ipc_thread); | 197 Context(Listener* listener, base::SingleThreadTaskRunner* ipc_thread); |
198 void ClearIPCTaskRunner(); | 198 void ClearIPCTaskRunner(); |
199 base::SingleThreadTaskRunner* ipc_task_runner() const { | 199 base::SingleThreadTaskRunner* ipc_task_runner() const { |
200 return ipc_task_runner_; | 200 return ipc_task_runner_; |
201 } | 201 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 OutgoingMessageFilter* outgoing_message_filter_; | 285 OutgoingMessageFilter* outgoing_message_filter_; |
286 | 286 |
287 // Whether the channel has been initialized. | 287 // Whether the channel has been initialized. |
288 bool did_init_; | 288 bool did_init_; |
289 }; | 289 }; |
290 | 290 |
291 } // namespace IPC | 291 } // namespace IPC |
292 | 292 |
293 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 293 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |