summaryrefslogtreecommitdiffstats
path: root/ipc/mojo/ipc.mojom
blob: 6b69ced5486b3c4b0ec1b982d17d91d806144055 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module IPC.mojom;

struct SerializedHandle {
  handle the_handle;

  enum Type {
    MOJO_HANDLE,
    WIN_HANDLE,
    MACH_PORT,
  };

  Type type;
};

struct Message {
  array<uint8> data;
  array<SerializedHandle>? handles;
};

interface Channel {
  Receive(Message message);
};

// An interface for connecting a pair of Channel interfaces representing a
// bidirectional IPC channel.
interface Bootstrap {
  // Initializes a Chrome IPC channel over |to_client_channel| and
  // |to_server_channel|. Each side also sends its PID to the other side.
  Init(associated Channel& to_client_channel,
       associated Channel to_server_channel,
       int32 pid) => (int32 pid);
};