Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: ipc/ipc.mojom

Issue 2163633003: Support early associated interface binding on ChannelMojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicit-channel-ipc-task-runner
Patch Set: . Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ipc/ipc_channel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module IPC.mojom; 5 module IPC.mojom;
6 6
7 struct SerializedHandle { 7 struct SerializedHandle {
8 handle the_handle; 8 handle the_handle;
9 9
10 enum Type { 10 enum Type {
11 MOJO_HANDLE, 11 MOJO_HANDLE,
12 PLATFORM_FILE, 12 PLATFORM_FILE,
13 WIN_HANDLE, 13 WIN_HANDLE,
14 MACH_PORT, 14 MACH_PORT,
15 }; 15 };
16 16
17 Type type; 17 Type type;
18 }; 18 };
19 19
20 // A placeholder interface type since we don't yet support generic associated 20 // A placeholder interface type since we don't yet support generic associated
21 // message pipe handles. 21 // message pipe handles.
22 interface GenericInterface {}; 22 interface GenericInterface {};
23 23
24 interface Channel { 24 interface Channel {
25 // Informs the remote end of this client's PID. Must be called exactly once,
26 // before any calls to Receive() below.
27 SetPeerPid(int32 pid);
28
29 // Transmits a classical Chrome IPC message.
25 Receive(array<uint8> data, array<SerializedHandle>? handles); 30 Receive(array<uint8> data, array<SerializedHandle>? handles);
26 31
32 // Requests a Channel-associated interface.
27 GetAssociatedInterface(string name, associated GenericInterface& request); 33 GetAssociatedInterface(string name, associated GenericInterface& request);
28 }; 34 };
29
30 // An interface for connecting a pair of Channel interfaces representing a
31 // bidirectional IPC channel.
32 interface Bootstrap {
33 // Initializes a Chrome IPC channel over |to_client_channel| and
34 // |to_server_channel|. Each side also sends its PID to the other side.
35 Init(associated Channel& to_client_channel,
36 associated Channel to_server_channel,
37 int32 pid) => (int32 pid);
38 };
OLDNEW
« no previous file with comments | « no previous file | ipc/ipc_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698