OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 int peer_pid_; | 249 int peer_pid_; |
250 bool channel_connected_called_; | 250 bool channel_connected_called_; |
251 | 251 |
252 // Holds filters between the AddFilter call on the listerner thread and the | 252 // Holds filters between the AddFilter call on the listerner thread and the |
253 // IPC thread when they're added to filters_. | 253 // IPC thread when they're added to filters_. |
254 std::vector<scoped_refptr<MessageFilter> > pending_filters_; | 254 std::vector<scoped_refptr<MessageFilter> > pending_filters_; |
255 // Lock for pending_filters_. | 255 // Lock for pending_filters_. |
256 base::Lock pending_filters_lock_; | 256 base::Lock pending_filters_lock_; |
257 }; | 257 }; |
258 | 258 |
259 Context* context() { return context_; } | 259 Context* context() { return context_.get(); } |
260 | 260 |
261 OutgoingMessageFilter* outgoing_message_filter() { | 261 OutgoingMessageFilter* outgoing_message_filter() { |
262 return outgoing_message_filter_; | 262 return outgoing_message_filter_; |
263 } | 263 } |
264 | 264 |
265 private: | 265 private: |
266 friend class SendCallbackHelper; | 266 friend class SendCallbackHelper; |
267 | 267 |
268 // By maintaining this indirection (ref-counted) to our internal state, we | 268 // By maintaining this indirection (ref-counted) to our internal state, we |
269 // can safely be destroyed while the background thread continues to do stuff | 269 // can safely be destroyed while the background thread continues to do stuff |
270 // that involves this data. | 270 // that involves this data. |
271 scoped_refptr<Context> context_; | 271 scoped_refptr<Context> context_; |
272 | 272 |
273 OutgoingMessageFilter* outgoing_message_filter_; | 273 OutgoingMessageFilter* outgoing_message_filter_; |
274 | 274 |
275 // Whether the channel has been initialized. | 275 // Whether the channel has been initialized. |
276 bool did_init_; | 276 bool did_init_; |
277 }; | 277 }; |
278 | 278 |
279 } // namespace IPC | 279 } // namespace IPC |
280 | 280 |
281 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 281 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |