blob: 2332111b2d9924289aaaa74cfc3548a885cd6fbf [file] [log] [blame]
sammce4d0abd2016-03-07 22:38:041// 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
Yuzhu Shena0a2b362017-08-25 22:31:397import "mojo/common/read_only_buffer.mojom";
Ken Rockotfd907632017-09-14 04:23:418import "mojo/public/interfaces/bindings/native_struct.mojom";
sammc57ed9f982016-03-10 06:28:359
rockot7c6bf952016-07-14 00:34:1110// A placeholder interface type since we don't yet support generic associated
11// message pipe handles.
12interface GenericInterface {};
13
sammce4d0abd2016-03-07 22:38:0414interface Channel {
rockot0e4de5f2016-07-22 21:18:0715 // Informs the remote end of this client's PID. Must be called exactly once,
16 // before any calls to Receive() below.
17 SetPeerPid(int32 pid);
18
19 // Transmits a classical Chrome IPC message.
Yuzhu Shena0a2b362017-08-25 22:31:3920 Receive(mojo.common.mojom.ReadOnlyBuffer data,
Ken Rockotfd907632017-09-14 04:23:4121 array<mojo.native.SerializedHandle>? handles);
rockot7c6bf952016-07-14 00:34:1122
rockot0e4de5f2016-07-22 21:18:0723 // Requests a Channel-associated interface.
rockot7c6bf952016-07-14 00:34:1124 GetAssociatedInterface(string name, associated GenericInterface& request);
sammce4d0abd2016-03-07 22:38:0425};
rockotff1b8532016-08-09 16:30:0526
27// A strictly nominal interface used to identify Channel bootstrap requests.
28interface ChannelBootstrap {};