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 #include "base/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/thread.h" | 6 #include "base/thread.h" |
7 #include "chrome/common/ipc_channel_proxy.h" | 7 #include "chrome/common/ipc_channel_proxy.h" |
8 #include "chrome/common/ipc_logging.h" | 8 #include "chrome/common/ipc_logging.h" |
9 #include "chrome/common/ipc_message_utils.h" | 9 #include "chrome/common/ipc_message_utils.h" |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 for (size_t i = 0; i < filters_.size(); ++i) | 74 for (size_t i = 0; i < filters_.size(); ++i) |
75 filters_[i]->OnChannelConnected(peer_pid); | 75 filters_[i]->OnChannelConnected(peer_pid); |
76 | 76 |
77 // See above comment about using listener_message_loop_ here. | 77 // See above comment about using listener_message_loop_ here. |
78 listener_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 78 listener_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
79 this, &Context::OnDispatchConnected)); | 79 this, &Context::OnDispatchConnected)); |
80 } | 80 } |
81 | 81 |
82 // Called on the IPC::Channel thread | 82 // Called on the IPC::Channel thread |
83 void ChannelProxy::Context::OnChannelError() { | 83 void ChannelProxy::Context::OnChannelError() { |
| 84 for (size_t i = 0; i < filters_.size(); ++i) |
| 85 filters_[i]->OnChannelError(); |
| 86 |
84 // See above comment about using listener_message_loop_ here. | 87 // See above comment about using listener_message_loop_ here. |
85 listener_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( | 88 listener_message_loop_->PostTask(FROM_HERE, NewRunnableMethod( |
86 this, &Context::OnDispatchError)); | 89 this, &Context::OnDispatchError)); |
87 } | 90 } |
88 | 91 |
89 // Called on the IPC::Channel thread | 92 // Called on the IPC::Channel thread |
90 void ChannelProxy::Context::OnChannelOpened() { | 93 void ChannelProxy::Context::OnChannelOpened() { |
91 DCHECK(channel_ != NULL); | 94 DCHECK(channel_ != NULL); |
92 | 95 |
93 // Assume a reference to ourselves on behalf of this thread. This reference | 96 // Assume a reference to ourselves on behalf of this thread. This reference |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 void ChannelProxy::OnClientConnected() { | 300 void ChannelProxy::OnClientConnected() { |
298 Channel *channel = context_.get()->channel_; | 301 Channel *channel = context_.get()->channel_; |
299 DCHECK(channel); // Channel must have been created first. | 302 DCHECK(channel); // Channel must have been created first. |
300 channel->OnClientConnected(); | 303 channel->OnClientConnected(); |
301 } | 304 } |
302 #endif | 305 #endif |
303 | 306 |
304 //----------------------------------------------------------------------------- | 307 //----------------------------------------------------------------------------- |
305 | 308 |
306 } // namespace IPC | 309 } // namespace IPC |
OLD | NEW |