dom/messagechannel/PMessagePort.ipdl
author Gijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 11 Jul 2017 16:33:10 +0100
changeset 418487 eadb66a18addce2862b1269fa10d288ee6ca4333
parent 408182 a1319e7c93845147828f1011a5af50b834d74022
child 572836 36631ec96f1fa043d0c37fe982e75af223087645
permissions -rw-r--r--
Bug 1354086 - fix fonts in overflow menu, combined buttons overflowing in customize mode, r=mikedeboer MozReview-Commit-ID: Ck2Za6FUbeo

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

include protocol PBackground;
include protocol PChildToParentStream; // FIXME: bug 792908
include protocol PFileDescriptorSet; // FIXME: bug 792908
include protocol PIPCBlobInputStream; // FIXME: bug 792908
include protocol PParentToChildStream; // FIXME: bug 792908

include DOMTypes;

using struct mozilla::SerializedStructuredCloneBuffer
  from "ipc/IPCMessageUtils.h";

namespace mozilla {
namespace dom {

// This protocol is used for the MessageChannel/MessagePort API
protocol PMessagePort
{
  manager PBackground;

  /* Many of these methods are used just for the shutdown sequence. The
     correct sequence for the child actor is:
     1. SendStopSendingData();
     2. RecvStopSendingDataConfirmed();
     3. SendClose();
     4. Recv__delete__(); */

  /* When the port is transferred the sequence is:
     1. SendStopSendingData();
     2. RecvStopSendingDataConfirmed();
     3. SendDisentangle();
     4. Recv__delete__(); */

parent:
  async PostMessages(ClonedMessageData[] messages);
  async Disentangle(ClonedMessageData[] messages);
  async StopSendingData();
  async Close();

child:
  async Entangled(ClonedMessageData[] messages);
  async ReceiveData(ClonedMessageData[] messages);
  async StopSendingDataConfirmed();

  async __delete__();
};

} // namespace dom
} // namespace mozilla