xref: /aosp_15_r20/external/cronet/ipc/ipc.mojom (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker// Copyright 2016 The Chromium Authors
2*6777b538SAndroid Build Coastguard Worker// Use of this source code is governed by a BSD-style license that can be
3*6777b538SAndroid Build Coastguard Worker// found in the LICENSE file.
4*6777b538SAndroid Build Coastguard Worker
5*6777b538SAndroid Build Coastguard Workermodule IPC.mojom;
6*6777b538SAndroid Build Coastguard Worker
7*6777b538SAndroid Build Coastguard Workerimport "mojo/public/interfaces/bindings/native_struct.mojom";
8*6777b538SAndroid Build Coastguard Workerimport "mojo/public/mojom/base/generic_pending_associated_receiver.mojom";
9*6777b538SAndroid Build Coastguard Worker
10*6777b538SAndroid Build Coastguard Worker// Typemapped such that arbitrarily large IPC::Message objects can be sent and
11*6777b538SAndroid Build Coastguard Worker// received with minimal copying.
12*6777b538SAndroid Build Coastguard Workerstruct Message {
13*6777b538SAndroid Build Coastguard Worker  array<uint8> bytes;
14*6777b538SAndroid Build Coastguard Worker  array<mojo.native.SerializedHandle>? handles;
15*6777b538SAndroid Build Coastguard Worker};
16*6777b538SAndroid Build Coastguard Worker
17*6777b538SAndroid Build Coastguard Workerinterface Channel {
18*6777b538SAndroid Build Coastguard Worker  // Informs the remote end of this client's PID. Must be called exactly once,
19*6777b538SAndroid Build Coastguard Worker  // before any calls to Receive() below.
20*6777b538SAndroid Build Coastguard Worker  SetPeerPid(int32 pid);
21*6777b538SAndroid Build Coastguard Worker
22*6777b538SAndroid Build Coastguard Worker  // Transmits a classical Chrome IPC message.
23*6777b538SAndroid Build Coastguard Worker  [UnlimitedSize]
24*6777b538SAndroid Build Coastguard Worker  Receive(Message message);
25*6777b538SAndroid Build Coastguard Worker
26*6777b538SAndroid Build Coastguard Worker  // Requests a Channel-associated interface.
27*6777b538SAndroid Build Coastguard Worker  GetAssociatedInterface(
28*6777b538SAndroid Build Coastguard Worker      mojo_base.mojom.GenericPendingAssociatedReceiver receiver);
29*6777b538SAndroid Build Coastguard Worker};
30*6777b538SAndroid Build Coastguard Worker
31*6777b538SAndroid Build Coastguard Worker// A strictly nominal interface used to identify Channel bootstrap requests.
32*6777b538SAndroid Build Coastguard Worker// This is only used in `AgentSchedulingGroup` initialization.
33*6777b538SAndroid Build Coastguard Workerinterface ChannelBootstrap {};
34*6777b538SAndroid Build Coastguard Worker
35