2015-05-03 19:32:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2015-01-15 16:58:40 +00:00
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_BroadcastChannelParent_h
|
|
|
|
#define mozilla_dom_BroadcastChannelParent_h
|
|
|
|
|
|
|
|
#include "mozilla/dom/PBroadcastChannelParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
|
|
|
|
namespace ipc {
|
|
|
|
class BackgroundParentImpl;
|
2015-05-06 10:07:06 +00:00
|
|
|
class PrincipalInfo;
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace ipc
|
2015-01-15 16:58:40 +00:00
|
|
|
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class BroadcastChannelService;
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
class BroadcastChannelParent final : public PBroadcastChannelParent {
|
2015-01-15 16:58:40 +00:00
|
|
|
friend class mozilla::ipc::BackgroundParentImpl;
|
|
|
|
|
2021-08-05 12:18:13 +00:00
|
|
|
using PrincipalInfo = mozilla::ipc::PrincipalInfo;
|
2015-05-06 10:07:06 +00:00
|
|
|
|
2015-01-15 16:58:40 +00:00
|
|
|
private:
|
2016-05-30 08:48:40 +00:00
|
|
|
explicit BroadcastChannelParent(const nsAString& aOriginChannelKey);
|
2015-01-15 16:58:40 +00:00
|
|
|
~BroadcastChannelParent();
|
|
|
|
|
2016-11-15 03:26:00 +00:00
|
|
|
virtual mozilla::ipc::IPCResult RecvPostMessage(
|
2020-01-24 08:00:08 +00:00
|
|
|
const MessageData& aData) override;
|
2015-01-15 16:58:40 +00:00
|
|
|
|
2016-11-15 03:26:00 +00:00
|
|
|
virtual mozilla::ipc::IPCResult RecvClose() override;
|
2015-01-15 16:58:40 +00:00
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
2015-01-15 16:58:40 +00:00
|
|
|
|
2015-10-18 05:24:48 +00:00
|
|
|
RefPtr<BroadcastChannelService> mService;
|
2016-05-30 08:48:40 +00:00
|
|
|
const nsString mOriginChannelKey;
|
2015-01-15 16:58:40 +00:00
|
|
|
};
|
|
|
|
|
2015-07-13 15:25:42 +00:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2015-01-15 16:58:40 +00:00
|
|
|
|
|
|
|
#endif // mozilla_dom_BroadcastChannelParent_h
|