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

Unified Diff: ppapi/proxy/proxy_channel.h

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.cc ('k') | ppapi/proxy/proxy_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/proxy_channel.h
===================================================================
--- ppapi/proxy/proxy_channel.h (revision 136613)
+++ ppapi/proxy/proxy_channel.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -38,6 +38,16 @@
// Returns the event object that becomes signalled when the main thread's
// message loop exits.
virtual base::WaitableEvent* GetShutdownEvent() = 0;
+
+ // Duplicates a handle to the provided object, returning one that is valid
+ // on the other side of the channel. This is part of the delegate interface
+ // because both sides of the channel may not have sufficient permission to
+ // duplicate handles directly. The implementation must provide the same
+ // guarantees as ProxyChannel::ShareHandleWithRemote below.
+ virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
+ base::PlatformFile handle,
+ const IPC::SyncChannel& channel,
+ bool should_close_source) = 0;
};
virtual ~ProxyChannel();
@@ -73,7 +83,7 @@
#endif
protected:
- explicit ProxyChannel(base::ProcessHandle remote_process_handle);
+ explicit ProxyChannel();
// You must call this function before anything else. Returns true on success.
// The delegate pointer must outlive this class, ownership is not
@@ -90,8 +100,6 @@
// Non-owning pointer. Guaranteed non-NULL after init is called.
ProxyChannel::Delegate* delegate_;
- base::ProcessHandle remote_process_handle_; // See getter above.
-
// When we're unit testing, this will indicate the sink for the messages to
// be deposited so they can be inspected by the test. When non-NULL, this
// indicates that the channel should not be used.
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | ppapi/proxy/proxy_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698