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 "ppapi/proxy/ppapi_proxy_test.h" | 5 #include "ppapi/proxy/ppapi_proxy_test.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <tuple> | 8 #include <tuple> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
246 base::WaitableEvent* | 246 base::WaitableEvent* |
247 PluginProxyTestHarness::PluginDelegateMock::GetShutdownEvent() { | 247 PluginProxyTestHarness::PluginDelegateMock::GetShutdownEvent() { |
248 return shutdown_event_; | 248 return shutdown_event_; |
249 } | 249 } |
250 | 250 |
251 IPC::PlatformFileForTransit | 251 IPC::PlatformFileForTransit |
252 PluginProxyTestHarness::PluginDelegateMock::ShareHandleWithRemote( | 252 PluginProxyTestHarness::PluginDelegateMock::ShareHandleWithRemote( |
253 base::PlatformFile handle, | 253 base::PlatformFile handle, |
254 base::ProcessId /* remote_pid */, | 254 base::ProcessId /* remote_pid */, |
255 bool should_close_source) { | 255 bool should_close_source) { |
256 return IPC::GetFileHandleForProcess(handle, | 256 return IPC::GetPlatformFileForTransit(handle, |
257 base::GetCurrentProcessHandle(), | 257 should_close_source); |
Mark Seaborn
2016/04/05 19:40:38
Nit: fits on previous line?
| |
258 should_close_source); | |
259 } | 258 } |
260 | 259 |
261 base::SharedMemoryHandle | 260 base::SharedMemoryHandle |
262 PluginProxyTestHarness::PluginDelegateMock::ShareSharedMemoryHandleWithRemote( | 261 PluginProxyTestHarness::PluginDelegateMock::ShareSharedMemoryHandleWithRemote( |
263 const base::SharedMemoryHandle& handle, | 262 const base::SharedMemoryHandle& handle, |
264 base::ProcessId /* remote_pid */) { | 263 base::ProcessId /* remote_pid */) { |
265 return base::SharedMemory::DuplicateHandle(handle); | 264 return base::SharedMemory::DuplicateHandle(handle); |
266 } | 265 } |
267 | 266 |
268 std::set<PP_Instance>* | 267 std::set<PP_Instance>* |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
484 | 483 |
485 base::WaitableEvent* HostProxyTestHarness::DelegateMock::GetShutdownEvent() { | 484 base::WaitableEvent* HostProxyTestHarness::DelegateMock::GetShutdownEvent() { |
486 return shutdown_event_; | 485 return shutdown_event_; |
487 } | 486 } |
488 | 487 |
489 IPC::PlatformFileForTransit | 488 IPC::PlatformFileForTransit |
490 HostProxyTestHarness::DelegateMock::ShareHandleWithRemote( | 489 HostProxyTestHarness::DelegateMock::ShareHandleWithRemote( |
491 base::PlatformFile handle, | 490 base::PlatformFile handle, |
492 base::ProcessId /* remote_pid */, | 491 base::ProcessId /* remote_pid */, |
493 bool should_close_source) { | 492 bool should_close_source) { |
494 return IPC::GetFileHandleForProcess(handle, | 493 return IPC::GetPlatformFileForTransit(handle, |
495 base::GetCurrentProcessHandle(), | 494 should_close_source); |
496 should_close_source); | |
497 } | 495 } |
498 | 496 |
499 base::SharedMemoryHandle | 497 base::SharedMemoryHandle |
500 HostProxyTestHarness::DelegateMock::ShareSharedMemoryHandleWithRemote( | 498 HostProxyTestHarness::DelegateMock::ShareSharedMemoryHandleWithRemote( |
501 const base::SharedMemoryHandle& handle, | 499 const base::SharedMemoryHandle& handle, |
502 base::ProcessId /*remote_pid*/) { | 500 base::ProcessId /*remote_pid*/) { |
503 return base::SharedMemory::DuplicateHandle(handle); | 501 return base::SharedMemory::DuplicateHandle(handle); |
504 } | 502 } |
505 | 503 |
506 // HostProxyTest --------------------------------------------------------------- | 504 // HostProxyTest --------------------------------------------------------------- |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
581 void TwoWayTest::PostTaskOnRemoteHarness(const base::Closure& task) { | 579 void TwoWayTest::PostTaskOnRemoteHarness(const base::Closure& task) { |
582 base::WaitableEvent task_complete(true, false); | 580 base::WaitableEvent task_complete(true, false); |
583 plugin_thread_.task_runner()->PostTask( | 581 plugin_thread_.task_runner()->PostTask( |
584 FROM_HERE, base::Bind(&RunTaskOnRemoteHarness, task, &task_complete)); | 582 FROM_HERE, base::Bind(&RunTaskOnRemoteHarness, task, &task_complete)); |
585 task_complete.Wait(); | 583 task_complete.Wait(); |
586 } | 584 } |
587 | 585 |
588 | 586 |
589 } // namespace proxy | 587 } // namespace proxy |
590 } // namespace ppapi | 588 } // namespace ppapi |
OLD | NEW |