Chromium Code Reviews| Index: ppapi/proxy/dispatcher.h |
| diff --git a/ppapi/proxy/dispatcher.h b/ppapi/proxy/dispatcher.h |
| index 82c0f319c642f154435758906872e7fdfc0ce069..a0b845a012003495e2e8c96c3f6c17a8d7aee8b5 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 |
| + // close 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 close); |
|
viettrungluu
2011/02/25 01:25:03
Let's call that parameter |should_close_handle|.
|
| // 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 |