Bug 1665252 - remove allowpaymentrequest attribute from HTMLIFrameElement r=dom-worke...
[gecko.git] / dom / base / MessageBroadcaster.cpp
blob257bd22a3da3ea7e4ee06ceff61fe58f45c0814b
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "mozilla/dom/MessageBroadcaster.h"
8 #include "mozilla/dom/ContentParent.h"
10 namespace mozilla {
11 namespace dom {
13 MessageBroadcaster::MessageBroadcaster(MessageBroadcaster* aParentManager,
14 MessageManagerFlags aFlags)
15 : MessageListenerManager(nullptr, aParentManager,
16 aFlags | MessageManagerFlags::MM_BROADCASTER) {
17 if (aParentManager) {
18 aParentManager->AddChildManager(this);
22 void MessageBroadcaster::ReleaseCachedProcesses() {
23 ContentParent::ReleaseCachedProcesses();
26 void MessageBroadcaster::AddChildManager(MessageListenerManager* aManager) {
27 mChildManagers.AppendElement(aManager);
29 RefPtr<nsFrameMessageManager> kungfuDeathGrip = this;
30 RefPtr<nsFrameMessageManager> kungfuDeathGrip2 = aManager;
32 LoadPendingScripts(this, aManager);
35 void MessageBroadcaster::RemoveChildManager(MessageListenerManager* aManager) {
36 mChildManagers.RemoveElement(aManager);
39 } // namespace dom
40 } // namespace mozilla