1// Copyright 2016 The Chromium Authors 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/interfaces/bindings/native_struct.mojom"; 8import "mojo/public/mojom/base/generic_pending_associated_receiver.mojom"; 9 10// Typemapped such that arbitrarily large IPC::Message objects can be sent and 11// received with minimal copying. 12struct Message { 13 array<uint8> bytes; 14 array<mojo.native.SerializedHandle>? handles; 15}; 16 17interface Channel { 18 // Informs the remote end of this client's PID. Must be called exactly once, 19 // before any calls to Receive() below. 20 SetPeerPid(int32 pid); 21 22 // Transmits a classical Chrome IPC message. 23 [UnlimitedSize] 24 Receive(Message message); 25 26 // Requests a Channel-associated interface. 27 GetAssociatedInterface( 28 mojo_base.mojom.GenericPendingAssociatedReceiver receiver); 29}; 30 31// A strictly nominal interface used to identify Channel bootstrap requests. 32// This is only used in `AgentSchedulingGroup` initialization. 33interface ChannelBootstrap {}; 34 35