1// Copyright 2016 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5module IPC.mojom; 6 7import "mojo/public/mojom/base/big_buffer.mojom"; 8import "mojo/public/interfaces/bindings/native_struct.mojom"; 9 10// A placeholder interface type since we don't yet support generic associated 11// message pipe handles. 12interface GenericInterface {}; 13 14// Typemapped such that arbitrarily large IPC::Message objects can be sent and 15// received with minimal copying. 16struct Message { 17 mojo_base.mojom.BigBuffer buffer; 18 array<mojo.native.SerializedHandle>? handles; 19}; 20 21interface Channel { 22 // Informs the remote end of this client's PID. Must be called exactly once, 23 // before any calls to Receive() below. 24 SetPeerPid(int32 pid); 25 26 // Transmits a classical Chrome IPC message. 27 Receive(Message message); 28 29 // Requests a Channel-associated interface. 30 GetAssociatedInterface( 31 string name, 32 pending_associated_receiver<GenericInterface> receiver); 33}; 34 35// A strictly nominal interface used to identify Channel bootstrap requests. 36interface ChannelBootstrap {}; 37 38