diff options
author | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 22:09:11 +0000 |
---|---|---|
committer | jschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 22:09:11 +0000 |
commit | f0ecb550248afddff9a28c8bf645e689f59a6e3e (patch) | |
tree | 5f5cf57c51d63213af26411488117f64e1a3b42d /ppapi/proxy/ppapi_proxy_test.cc | |
parent | e9dfe22b38c9f4b14dbf047e3e0816537ea632d4 (diff) | |
download | chromium_src-f0ecb550248afddff9a28c8bf645e689f59a6e3e.zip chromium_src-f0ecb550248afddff9a28c8bf645e689f59a6e3e.tar.gz chromium_src-f0ecb550248afddff9a28c8bf645e689f59a6e3e.tar.bz2 |
Broker out PPAPI handle duplication
BUG=127449
Review URL: https://chromiumcodereview.appspot.com/10378057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136686 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/ppapi_proxy_test.cc')
-rw-r--r-- | ppapi/proxy/ppapi_proxy_test.cc | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc index e1fb6e7..445f84b 100644 --- a/ppapi/proxy/ppapi_proxy_test.cc +++ b/ppapi/proxy/ppapi_proxy_test.cc @@ -157,7 +157,6 @@ void PluginProxyTestHarness::SetUpHarness() { resource_tracker().DidCreateInstance(pp_instance()); plugin_dispatcher_.reset(new PluginDispatcher( - base::Process::Current().handle(), &MockGetInterface, false)); plugin_dispatcher_->InitWithTestSink(&sink()); @@ -175,7 +174,6 @@ void PluginProxyTestHarness::SetUpHarnessWithChannel( plugin_delegate_mock_.Init(ipc_message_loop, shutdown_event); plugin_dispatcher_.reset(new PluginDispatcher( - base::Process::Current().handle(), &MockGetInterface, false)); plugin_dispatcher_->InitPluginWithChannel(&plugin_delegate_mock_, @@ -201,6 +199,16 @@ PluginProxyTestHarness::PluginDelegateMock::GetShutdownEvent() { return shutdown_event_; } +IPC::PlatformFileForTransit +PluginProxyTestHarness::PluginDelegateMock::ShareHandleWithRemote( + base::PlatformFile handle, + const IPC::SyncChannel& /* channel */, + bool should_close_source) { + return IPC::GetFileHandleForProcess(handle, + base::Process::Current().handle(), + should_close_source); +} + std::set<PP_Instance>* PluginProxyTestHarness::PluginDelegateMock::GetGloballySeenInstanceIDSet() { return &instance_id_set_; @@ -266,7 +274,6 @@ void HostProxyTestHarness::SetUpHarness() { // These must be first since the dispatcher set-up uses them. PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals()); host_dispatcher_.reset(new HostDispatcher( - base::Process::Current().handle(), pp_module(), &MockGetInterface, status_receiver_.get())); @@ -284,7 +291,6 @@ void HostProxyTestHarness::SetUpHarnessWithChannel( delegate_mock_.Init(ipc_message_loop, shutdown_event); host_dispatcher_.reset(new HostDispatcher( - base::Process::Current().handle(), pp_module(), &MockGetInterface, status_receiver_.get())); @@ -308,6 +314,16 @@ base::WaitableEvent* HostProxyTestHarness::DelegateMock::GetShutdownEvent() { return shutdown_event_; } +IPC::PlatformFileForTransit +HostProxyTestHarness::DelegateMock::ShareHandleWithRemote( + base::PlatformFile handle, + const IPC::SyncChannel& /* channel */, + bool should_close_source) { + return IPC::GetFileHandleForProcess(handle, + base::Process::Current().handle(), + should_close_source); +} + // HostProxyTest --------------------------------------------------------------- |