| 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 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 const scoped_refptr<base::TaskRunner>& ipc_task_runner) { | 228 const scoped_refptr<base::TaskRunner>& ipc_task_runner) { |
| 229 if (globals_config_ == PER_THREAD_GLOBALS) { | 229 if (globals_config_ == PER_THREAD_GLOBALS) { |
| 230 plugin_globals_.reset(new PluginGlobals(PpapiGlobals::PerThreadForTest(), | 230 plugin_globals_.reset(new PluginGlobals(PpapiGlobals::PerThreadForTest(), |
| 231 ipc_task_runner)); | 231 ipc_task_runner)); |
| 232 PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals()); | 232 PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals()); |
| 233 } else { | 233 } else { |
| 234 plugin_globals_.reset(new PluginGlobals(ipc_task_runner)); | 234 plugin_globals_.reset(new PluginGlobals(ipc_task_runner)); |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 base::MessageLoopProxy* | 238 base::SingleThreadTaskRunner* |
| 239 PluginProxyTestHarness::PluginDelegateMock::GetIPCMessageLoop() { | 239 PluginProxyTestHarness::PluginDelegateMock::GetIPCTaskRunner() { |
| 240 return ipc_message_loop_; | 240 return ipc_message_loop_; |
| 241 } | 241 } |
| 242 | 242 |
| 243 base::WaitableEvent* | 243 base::WaitableEvent* |
| 244 PluginProxyTestHarness::PluginDelegateMock::GetShutdownEvent() { | 244 PluginProxyTestHarness::PluginDelegateMock::GetShutdownEvent() { |
| 245 return shutdown_event_; | 245 return shutdown_event_; |
| 246 } | 246 } |
| 247 | 247 |
| 248 IPC::PlatformFileForTransit | 248 IPC::PlatformFileForTransit |
| 249 PluginProxyTestHarness::PluginDelegateMock::ShareHandleWithRemote( | 249 PluginProxyTestHarness::PluginDelegateMock::ShareHandleWithRemote( |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 void HostProxyTestHarness::CreateHostGlobals() { | 463 void HostProxyTestHarness::CreateHostGlobals() { |
| 464 disable_locking_.reset(new ProxyLock::LockingDisablerForTest); | 464 disable_locking_.reset(new ProxyLock::LockingDisablerForTest); |
| 465 if (globals_config_ == PER_THREAD_GLOBALS) { | 465 if (globals_config_ == PER_THREAD_GLOBALS) { |
| 466 host_globals_.reset(new TestGlobals(PpapiGlobals::PerThreadForTest())); | 466 host_globals_.reset(new TestGlobals(PpapiGlobals::PerThreadForTest())); |
| 467 PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals()); | 467 PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals()); |
| 468 } else { | 468 } else { |
| 469 host_globals_.reset(new TestGlobals()); | 469 host_globals_.reset(new TestGlobals()); |
| 470 } | 470 } |
| 471 } | 471 } |
| 472 | 472 |
| 473 base::MessageLoopProxy* | 473 base::MessageLoopProxy* HostProxyTestHarness::DelegateMock::GetIPCTaskRunner() { |
| 474 HostProxyTestHarness::DelegateMock::GetIPCMessageLoop() { | |
| 475 return ipc_message_loop_; | 474 return ipc_message_loop_; |
| 476 } | 475 } |
| 477 | 476 |
| 478 base::WaitableEvent* HostProxyTestHarness::DelegateMock::GetShutdownEvent() { | 477 base::WaitableEvent* HostProxyTestHarness::DelegateMock::GetShutdownEvent() { |
| 479 return shutdown_event_; | 478 return shutdown_event_; |
| 480 } | 479 } |
| 481 | 480 |
| 482 IPC::PlatformFileForTransit | 481 IPC::PlatformFileForTransit |
| 483 HostProxyTestHarness::DelegateMock::ShareHandleWithRemote( | 482 HostProxyTestHarness::DelegateMock::ShareHandleWithRemote( |
| 484 base::PlatformFile handle, | 483 base::PlatformFile handle, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, | 576 plugin_thread_.message_loop_proxy()->PostTask(FROM_HERE, |
| 578 base::Bind(&RunTaskOnRemoteHarness, | 577 base::Bind(&RunTaskOnRemoteHarness, |
| 579 task, | 578 task, |
| 580 &task_complete)); | 579 &task_complete)); |
| 581 task_complete.Wait(); | 580 task_complete.Wait(); |
| 582 } | 581 } |
| 583 | 582 |
| 584 | 583 |
| 585 } // namespace proxy | 584 } // namespace proxy |
| 586 } // namespace ppapi | 585 } // namespace ppapi |
| OLD | NEW |