| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 
| 11 #include "base/lock.h" |  | 
| 12 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" | 
| 13 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" | 
|  | 13 #include "base/synchronization/lock.h" | 
| 14 #include "ipc/ipc_channel.h" | 14 #include "ipc/ipc_channel.h" | 
| 15 #include "ipc/ipc_channel_handle.h" | 15 #include "ipc/ipc_channel_handle.h" | 
| 16 | 16 | 
| 17 class MessageLoop; | 17 class MessageLoop; | 
| 18 | 18 | 
| 19 namespace IPC { | 19 namespace IPC { | 
| 20 | 20 | 
| 21 class SendTask; | 21 class SendTask; | 
| 22 | 22 | 
| 23 //----------------------------------------------------------------------------- | 23 //----------------------------------------------------------------------------- | 
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 222     MessageLoop* ipc_message_loop_; | 222     MessageLoop* ipc_message_loop_; | 
| 223     scoped_ptr<Channel> channel_; | 223     scoped_ptr<Channel> channel_; | 
| 224     std::string channel_id_; | 224     std::string channel_id_; | 
| 225     int peer_pid_; | 225     int peer_pid_; | 
| 226     bool channel_connected_called_; | 226     bool channel_connected_called_; | 
| 227 | 227 | 
| 228     // Holds filters between the AddFilter call on the listerner thread and the | 228     // Holds filters between the AddFilter call on the listerner thread and the | 
| 229     // IPC thread when they're added to filters_. | 229     // IPC thread when they're added to filters_. | 
| 230     std::vector<scoped_refptr<MessageFilter> > pending_filters_; | 230     std::vector<scoped_refptr<MessageFilter> > pending_filters_; | 
| 231     // Lock for pending_filters_. | 231     // Lock for pending_filters_. | 
| 232     Lock pending_filters_lock_; | 232     base::Lock pending_filters_lock_; | 
| 233   }; | 233   }; | 
| 234 | 234 | 
| 235   Context* context() { return context_; } | 235   Context* context() { return context_; } | 
| 236 | 236 | 
| 237  private: | 237  private: | 
| 238   friend class SendTask; | 238   friend class SendTask; | 
| 239 | 239 | 
| 240   void Init(const IPC::ChannelHandle& channel_handle, Channel::Mode mode, | 240   void Init(const IPC::ChannelHandle& channel_handle, Channel::Mode mode, | 
| 241             MessageLoop* ipc_thread_loop, bool create_pipe_now); | 241             MessageLoop* ipc_thread_loop, bool create_pipe_now); | 
| 242 | 242 | 
| 243   // By maintaining this indirection (ref-counted) to our internal state, we | 243   // By maintaining this indirection (ref-counted) to our internal state, we | 
| 244   // can safely be destroyed while the background thread continues to do stuff | 244   // can safely be destroyed while the background thread continues to do stuff | 
| 245   // that involves this data. | 245   // that involves this data. | 
| 246   scoped_refptr<Context> context_; | 246   scoped_refptr<Context> context_; | 
| 247 }; | 247 }; | 
| 248 | 248 | 
| 249 }  // namespace IPC | 249 }  // namespace IPC | 
| 250 | 250 | 
| 251 #endif  // IPC_IPC_CHANNEL_PROXY_H__ | 251 #endif  // IPC_IPC_CHANNEL_PROXY_H__ | 
| OLD | NEW | 
|---|