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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 // Holds filters between the AddFilter call on the listerner thread and the | 245 // Holds filters between the AddFilter call on the listerner thread and the |
246 // IPC thread when they're added to filters_. | 246 // IPC thread when they're added to filters_. |
247 std::vector<scoped_refptr<MessageFilter> > pending_filters_; | 247 std::vector<scoped_refptr<MessageFilter> > pending_filters_; |
248 // Lock for pending_filters_. | 248 // Lock for pending_filters_. |
249 base::Lock pending_filters_lock_; | 249 base::Lock pending_filters_lock_; |
250 | 250 |
251 // Cached copy of the peer process ID. Set on IPC but read on both IPC and | 251 // Cached copy of the peer process ID. Set on IPC but read on both IPC and |
252 // listener threads. | 252 // listener threads. |
253 base::ProcessId peer_pid_; | 253 base::ProcessId peer_pid_; |
| 254 |
| 255 bool channel_is_connected_; |
254 }; | 256 }; |
255 | 257 |
256 Context* context() { return context_.get(); } | 258 Context* context() { return context_.get(); } |
257 | 259 |
258 private: | 260 private: |
259 friend class SendCallbackHelper; | 261 friend class SendCallbackHelper; |
260 | 262 |
261 // By maintaining this indirection (ref-counted) to our internal state, we | 263 // By maintaining this indirection (ref-counted) to our internal state, we |
262 // can safely be destroyed while the background thread continues to do stuff | 264 // can safely be destroyed while the background thread continues to do stuff |
263 // that involves this data. | 265 // that involves this data. |
264 scoped_refptr<Context> context_; | 266 scoped_refptr<Context> context_; |
265 | 267 |
266 // Whether the channel has been initialized. | 268 // Whether the channel has been initialized. |
267 bool did_init_; | 269 bool did_init_; |
268 }; | 270 }; |
269 | 271 |
270 } // namespace IPC | 272 } // namespace IPC |
271 | 273 |
272 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 274 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |