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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 void ChannelProxy::RemoveFilter(MessageFilter* filter) { | 280 void ChannelProxy::RemoveFilter(MessageFilter* filter) { |
281 context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( | 281 context_->ipc_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( |
282 context_.get(), &Context::OnRemoveFilter, filter)); | 282 context_.get(), &Context::OnRemoveFilter, filter)); |
283 } | 283 } |
284 | 284 |
285 #if defined(OS_POSIX) | 285 #if defined(OS_POSIX) |
286 // See the TODO regarding lazy initialization of the channel in | 286 // See the TODO regarding lazy initialization of the channel in |
287 // ChannelProxy::Init(). | 287 // ChannelProxy::Init(). |
288 // We assume that IPC::Channel::GetClientFileDescriptorMapping() is thread-safe. | 288 // We assume that IPC::Channel::GetClientFileDescriptorMapping() is thread-safe. |
289 void ChannelProxy::GetClientFileDescriptorMapping(int *src_fd, int *dest_fd) { | 289 void ChannelProxy::GetClientFileDescriptorMapping(int *src_fd, |
| 290 int *dest_fd) const { |
290 Channel *channel = context_.get()->channel_; | 291 Channel *channel = context_.get()->channel_; |
291 DCHECK(channel); // Channel must have been created first. | 292 DCHECK(channel); // Channel must have been created first. |
292 channel->GetClientFileDescriptorMapping(src_fd, dest_fd); | 293 channel->GetClientFileDescriptorMapping(src_fd, dest_fd); |
293 } | 294 } |
294 | 295 |
295 // We assume that IP::Channel::OnClientConnected() is thread-safe. | 296 // We assume that IP::Channel::OnClientConnected() is thread-safe. |
296 void ChannelProxy::OnClientConnected() { | 297 void ChannelProxy::OnClientConnected() { |
297 Channel *channel = context_.get()->channel_; | 298 Channel *channel = context_.get()->channel_; |
298 DCHECK(channel); // Channel must have been created first. | 299 DCHECK(channel); // Channel must have been created first. |
299 channel->OnClientConnected(); | 300 channel->OnClientConnected(); |
300 } | 301 } |
301 #endif | 302 #endif |
302 | 303 |
303 //----------------------------------------------------------------------------- | 304 //----------------------------------------------------------------------------- |
304 | 305 |
305 } // namespace IPC | 306 } // namespace IPC |
OLD | NEW |