Source code

Revision control

Other Tools

1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
include protocol PBackground;
6
include protocol PChildToParentStream; // FIXME: bug 792908
7
include protocol PFileDescriptorSet; // FIXME: bug 792908
8
include protocol PIPCBlobInputStream; // FIXME: bug 792908
9
include protocol PParentToChildStream; // FIXME: bug 792908
10
11
include DOMTypes;
12
include ProtocolTypes;
13
14
namespace mozilla {
15
namespace dom {
16
17
// This protocol is used for the MessageChannel/MessagePort API
18
protocol PMessagePort
19
{
20
manager PBackground;
21
22
/* Many of these methods are used just for the shutdown sequence. The
23
correct sequence for the child actor is:
24
1. SendStopSendingData();
25
2. RecvStopSendingDataConfirmed();
26
3. SendClose();
27
4. Recv__delete__(); */
28
29
/* When the port is transferred the sequence is:
30
1. SendStopSendingData();
31
2. RecvStopSendingDataConfirmed();
32
3. SendDisentangle();
33
4. Recv__delete__(); */
34
35
parent:
36
async PostMessages(MessageData[] messages);
37
async Disentangle(MessageData[] messages);
38
async StopSendingData();
39
async Close();
40
41
child:
42
async Entangled(MessageData[] messages);
43
async ReceiveData(MessageData[] messages);
44
async StopSendingDataConfirmed();
45
46
async __delete__();
47
};
48
49
} // namespace dom
50
} // namespace mozilla