diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-14 19:35:10 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-14 19:35:10 +0000 |
commit | e7f009da9894df2b8e48aa21578aa4e5ecd7a765 (patch) | |
tree | 0ca8f38fa2a3531d6f6ef373faac0b1f84eb7369 /ppapi/proxy/proxy_channel.cc | |
parent | 286d5d1b43741c2a4b18d4dde38430e5d06097fa (diff) | |
download | chromium_src-e7f009da9894df2b8e48aa21578aa4e5ecd7a765.zip chromium_src-e7f009da9894df2b8e48aa21578aa4e5ecd7a765.tar.gz chromium_src-e7f009da9894df2b8e48aa21578aa4e5ecd7a765.tar.bz2 |
Hooking MHTML generation to the browser.
This CL adds a class that can be used to generate MHTML for the current
page of a tab.
It is not yet surfaced in the UI.
BUG=None
TEST=Run the browser tests.
Review URL: http://codereview.chromium.org/7044095
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89047 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/proxy_channel.cc')
-rw-r--r-- | ppapi/proxy/proxy_channel.cc | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/ppapi/proxy/proxy_channel.cc b/ppapi/proxy/proxy_channel.cc index 0bce041..d304dca 100644 --- a/ppapi/proxy/proxy_channel.cc +++ b/ppapi/proxy/proxy_channel.cc @@ -4,6 +4,7 @@ #include "ppapi/proxy/proxy_channel.h" +#include "ipc/ipc_platform_file.h" #include "ipc/ipc_test_sink.h" namespace pp { @@ -49,28 +50,8 @@ int ProxyChannel::GetRendererFD() { IPC::PlatformFileForTransit ProxyChannel::ShareHandleWithRemote( base::PlatformFile handle, bool should_close_source) { - IPC::PlatformFileForTransit out_handle; -#if defined(OS_WIN) - DWORD options = DUPLICATE_SAME_ACCESS; - if (should_close_source) - options |= DUPLICATE_CLOSE_SOURCE; - if (!::DuplicateHandle(::GetCurrentProcess(), - handle, - remote_process_handle_, - &out_handle, - 0, - FALSE, - options)) - out_handle = IPC::InvalidPlatformFileForTransit(); -#elif defined(OS_POSIX) - // If asked to close the source, we can simply re-use the source fd instead of - // dup()ing and close()ing. - int fd = should_close_source ? handle : ::dup(handle); - out_handle = base::FileDescriptor(fd, true); -#else - #error Not implemented. -#endif - return out_handle; + return IPC::GetFileHandleForProcess(handle, remote_process_handle_, + should_close_source); } bool ProxyChannel::Send(IPC::Message* msg) { |