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

Unified Diff: ppapi/proxy/dispatcher.h

Issue 6580050: Factor fd sharing code in proxy and fix fd issues once and for all. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix review comments Created 9 years, 10 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 | « no previous file | ppapi/proxy/dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/dispatcher.h
diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h
index 82c0f319c642f154435758906872e7fdfc0ce069..161aa54bd6ba00dbdc0d2af5921985e72a792c03 100644
--- a/ppapi/proxy/dispatcher.h
+++ b/ppapi/proxy/dispatcher.h
@@ -15,6 +15,7 @@
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message.h"
+#include "ipc/ipc_platform_file.h"
#include "ppapi/c/pp_module.h"
#include "ppapi/proxy/callback_tracker.h"
#include "ppapi/proxy/interface_id.h"
@@ -83,13 +84,15 @@ class Dispatcher : public IPC::Channel::Listener,
// Wrapper for calling the local GetInterface function.
const void* GetLocalInterface(const char* interface);
- // Returns the remote process' handle. For the host dispatcher, this will be
- // the plugin process, and for the plugin dispatcher, this will be the
- // renderer process. This is used for sharing memory and such and is
- // guaranteed valid (unless the remote process has suddenly died).
- base::ProcessHandle remote_process_handle() const {
- return remote_process_handle_;
- }
+ // Shares a file handle (HANDLE / file descriptor) with the remote side. It
+ // returns a handle that should be sent in exactly one IPC message. Upon
+ // receipt, the remote side then owns that handle. Note: if sending the
+ // message fails, the returned handle is properly closed by the IPC system. If
+ // should_close_source is set to true, the original handle is closed by this
+ // operation and should not be used again.
+ IPC::PlatformFileForTransit ShareHandleWithRemote(
+ base::PlatformFile handle,
+ bool should_close_source);
// Called if the remote side is declaring to us which interfaces it supports
// so we don't have to query for each one. We'll pre-create proxies for
« no previous file with comments | « no previous file | ppapi/proxy/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698