michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=8 et : michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_ipc_Transport_h michael@0: #define mozilla_ipc_Transport_h 1 michael@0: michael@0: #include "base/process_util.h" michael@0: #include "chrome/common/ipc_channel.h" michael@0: michael@0: #ifdef OS_POSIX michael@0: # include "mozilla/ipc/Transport_posix.h" michael@0: #elif OS_WIN michael@0: # include "mozilla/ipc/Transport_win.h" michael@0: #endif michael@0: michael@0: namespace mozilla { michael@0: namespace ipc { michael@0: michael@0: class FileDescriptor; michael@0: michael@0: typedef IPC::Channel Transport; michael@0: michael@0: bool CreateTransport(base::ProcessHandle aProcOne, base::ProcessHandle aProcTwo, michael@0: TransportDescriptor* aOne, TransportDescriptor* aTwo); michael@0: michael@0: Transport* OpenDescriptor(const TransportDescriptor& aTd, michael@0: Transport::Mode aMode); michael@0: michael@0: Transport* OpenDescriptor(const FileDescriptor& aFd, michael@0: Transport::Mode aMode); michael@0: michael@0: void CloseDescriptor(const TransportDescriptor& aTd); michael@0: michael@0: } // namespace ipc michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_ipc_Transport_h