// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MOJO_PUBLIC_CPP_PLATFORM_PLATFORM_CHANNEL_H_ #define MOJO_PUBLIC_CPP_PLATFORM_PLATFORM_CHANNEL_H_ #include <string_view> #include "base/command_line.h" #include "base/component_export.h" #include "base/process/launch.h" #include "build/build_config.h" #include "mojo/public/cpp/platform/platform_channel_endpoint.h" namespace mojo { // PlatformChannel encapsulates construction and ownership of two entangled // endpoints of a platform-specific communication primitive, e.g. a Windows // pipe, a Unix domain socket, or a macOS Mach port pair. One endpoint is // designated as the "local" endpoint and should be retained by the creating // process; the other endpoint is designated as the "remote" endpoint and // should be passed to an external process. // // PlatformChannels can be used to bootstrap Mojo IPC between one process and // another. Typically the other process is a child of this process, and there // are helper methods for passing the endpoint to a child as such; but this // arrangement is not strictly necessary on all platforms. // // For a channel which allows clients to connect by name (i.e. a named pipe // or socket server, supported only on Windows and POSIX systems) see // NamedPlatformChannel. class COMPONENT_EXPORT(MOJO_CPP_PLATFORM) PlatformChannel { … }; } // namespace mojo #endif // MOJO_PUBLIC_CPP_PLATFORM_PLATFORM_CHANNEL_H_