sammc | e4d0abd | 2016-03-07 22:38:04 | [diff] [blame] | 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 | |
| 5 | module IPC.mojom; |
| 6 | |
Yuzhu Shen | a0a2b36 | 2017-08-25 22:31:39 | [diff] [blame] | 7 | import "mojo/common/read_only_buffer.mojom"; |
Ken Rockot | fd90763 | 2017-09-14 04:23:41 | [diff] [blame^] | 8 | import "mojo/public/interfaces/bindings/native_struct.mojom"; |
sammc | 57ed9f98 | 2016-03-10 06:28:35 | [diff] [blame] | 9 | |
rockot | 7c6bf95 | 2016-07-14 00:34:11 | [diff] [blame] | 10 | // A placeholder interface type since we don't yet support generic associated |
| 11 | // message pipe handles. |
| 12 | interface GenericInterface {}; |
| 13 | |
sammc | e4d0abd | 2016-03-07 22:38:04 | [diff] [blame] | 14 | interface Channel { |
rockot | 0e4de5f | 2016-07-22 21:18:07 | [diff] [blame] | 15 | // 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 Shen | a0a2b36 | 2017-08-25 22:31:39 | [diff] [blame] | 20 | Receive(mojo.common.mojom.ReadOnlyBuffer data, |
Ken Rockot | fd90763 | 2017-09-14 04:23:41 | [diff] [blame^] | 21 | array<mojo.native.SerializedHandle>? handles); |
rockot | 7c6bf95 | 2016-07-14 00:34:11 | [diff] [blame] | 22 | |
rockot | 0e4de5f | 2016-07-22 21:18:07 | [diff] [blame] | 23 | // Requests a Channel-associated interface. |
rockot | 7c6bf95 | 2016-07-14 00:34:11 | [diff] [blame] | 24 | GetAssociatedInterface(string name, associated GenericInterface& request); |
sammc | e4d0abd | 2016-03-07 22:38:04 | [diff] [blame] | 25 | }; |
rockot | ff1b853 | 2016-08-09 16:30:05 | [diff] [blame] | 26 | |
| 27 | // A strictly nominal interface used to identify Channel bootstrap requests. |
| 28 | interface ChannelBootstrap {}; |