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