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
13
using struct mozilla::SerializedStructuredCloneBuffer
14
from "ipc/IPCMessageUtils.h";
15
16
namespace mozilla {
17
namespace dom {
18
19
// This protocol is used for the MessageChannel/MessagePort API
20
protocol PMessagePort
21
{
22
manager PBackground;
23
24
/* Many of these methods are used just for the shutdown sequence. The
25
correct sequence for the child actor is:
26
1. SendStopSendingData();
27
2. RecvStopSendingDataConfirmed();
28
3. SendClose();
29
4. Recv__delete__(); */
30
31
/* When the port is transferred the sequence is:
32
1. SendStopSendingData();
33
2. RecvStopSendingDataConfirmed();
34
3. SendDisentangle();
35
4. Recv__delete__(); */
36
37
parent:
38
async PostMessages(ClonedMessageData[] messages);
39
async Disentangle(ClonedMessageData[] messages);
40
async StopSendingData();
41
async Close();
42
43
child:
44
async Entangled(ClonedMessageData[] messages);
45
async ReceiveData(ClonedMessageData[] messages);
46
async StopSendingDataConfirmed();
47
48
async __delete__();
49
};
50
51
} // namespace dom
52
} // namespace mozilla