• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5module IPC.mojom;
6
7// NOTE: This MUST match the value of MSG_ROUTING_NONE in src/ipc/ipc_message.h.
8const int32 kRoutingIdNone = -2;
9
10struct SerializedHandle {
11  handle the_handle;
12
13  enum Type {
14    MOJO_HANDLE,
15    PLATFORM_FILE,
16    WIN_HANDLE,
17    MACH_PORT,
18  };
19
20  Type type;
21};
22
23// A placeholder interface type since we don't yet support generic associated
24// message pipe handles.
25interface GenericInterface {};
26
27interface Channel {
28  // Informs the remote end of this client's PID. Must be called exactly once,
29  // before any calls to Receive() below.
30  SetPeerPid(int32 pid);
31
32  // Transmits a classical Chrome IPC message.
33  Receive(array<uint8> data, array<SerializedHandle>? handles);
34
35  // Requests a Channel-associated interface.
36  GetAssociatedInterface(string name, associated GenericInterface& request);
37};
38
39// A strictly nominal interface used to identify Channel bootstrap requests.
40interface ChannelBootstrap {};
41