| 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 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" |
| 6 | 6 |
| 7 #include "content/child/child_process.h" | 7 #include "content/child/child_process.h" |
| 8 #include "content/common/sandbox_util.h" | 8 #include "content/common/sandbox_util.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 PepperProxyChannelDelegateImpl::~PepperProxyChannelDelegateImpl() { | 12 PepperProxyChannelDelegateImpl::~PepperProxyChannelDelegateImpl() {} |
| 13 } | |
| 14 | 13 |
| 15 base::MessageLoopProxy* PepperProxyChannelDelegateImpl::GetIPCMessageLoop() { | 14 base::MessageLoopProxy* PepperProxyChannelDelegateImpl::GetIPCMessageLoop() { |
| 16 // This is called only in the renderer so we know we have a child process. | 15 // This is called only in the renderer so we know we have a child process. |
| 17 DCHECK(ChildProcess::current()) << "Must be in the renderer."; | 16 DCHECK(ChildProcess::current()) << "Must be in the renderer."; |
| 18 return ChildProcess::current()->io_message_loop_proxy(); | 17 return ChildProcess::current()->io_message_loop_proxy(); |
| 19 } | 18 } |
| 20 | 19 |
| 21 base::WaitableEvent* PepperProxyChannelDelegateImpl::GetShutdownEvent() { | 20 base::WaitableEvent* PepperProxyChannelDelegateImpl::GetShutdownEvent() { |
| 22 DCHECK(ChildProcess::current()) << "Must be in the renderer."; | 21 DCHECK(ChildProcess::current()) << "Must be in the renderer."; |
| 23 return ChildProcess::current()->GetShutDownEvent(); | 22 return ChildProcess::current()->GetShutDownEvent(); |
| 24 } | 23 } |
| 25 | 24 |
| 26 IPC::PlatformFileForTransit | 25 IPC::PlatformFileForTransit |
| 27 PepperProxyChannelDelegateImpl::ShareHandleWithRemote( | 26 PepperProxyChannelDelegateImpl::ShareHandleWithRemote( |
| 28 base::PlatformFile handle, | 27 base::PlatformFile handle, |
| 29 base::ProcessId remote_pid, | 28 base::ProcessId remote_pid, |
| 30 bool should_close_source) { | 29 bool should_close_source) { |
| 31 return BrokerGetFileHandleForProcess(handle, remote_pid, | 30 return BrokerGetFileHandleForProcess(handle, remote_pid, should_close_source); |
| 32 should_close_source); | |
| 33 } | 31 } |
| 34 | 32 |
| 35 } // namespace content | 33 } // namespace content |
| OLD | NEW |