Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(979)

Unified Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 10378057: Broker out PPAPI handle duplication (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/proxy_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppapi_proxy_test.cc
===================================================================
--- ppapi/proxy/ppapi_proxy_test.cc (revision 136613)
+++ ppapi/proxy/ppapi_proxy_test.cc (working copy)
@@ -157,7 +157,6 @@
resource_tracker().DidCreateInstance(pp_instance());
plugin_dispatcher_.reset(new PluginDispatcher(
- base::Process::Current().handle(),
&MockGetInterface,
false));
plugin_dispatcher_->InitWithTestSink(&sink());
@@ -175,7 +174,6 @@
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 @@
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 @@
// 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 @@
delegate_mock_.Init(ipc_message_loop, shutdown_event);
host_dispatcher_.reset(new HostDispatcher(
- base::Process::Current().handle(),
pp_module(),
&MockGetInterface,
status_receiver_.get()));
@@ -308,7 +314,17 @@
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 ---------------------------------------------------------------
HostProxyTest::HostProxyTest() {
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/proxy_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698