2015-05-03 22:32:37 +03: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 19:58:40 +03: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 13:07:06 +03:00
|
|
|
class PrincipalInfo;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace ipc
|
2015-01-15 19:58:40 +03:00
|
|
|
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class BroadcastChannelService;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class BroadcastChannelParent final : public PBroadcastChannelParent
|
2015-01-15 19:58:40 +03:00
|
|
|
{
|
|
|
|
friend class mozilla::ipc::BackgroundParentImpl;
|
|
|
|
|
2015-05-06 13:07:06 +03:00
|
|
|
typedef mozilla::ipc::PrincipalInfo PrincipalInfo;
|
|
|
|
|
2015-01-15 19:58:40 +03:00
|
|
|
private:
|
2016-05-30 11:48:40 +03:00
|
|
|
explicit BroadcastChannelParent(const nsAString& aOriginChannelKey);
|
2015-01-15 19:58:40 +03:00
|
|
|
~BroadcastChannelParent();
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult
|
2015-03-21 19:28:04 +03:00
|
|
|
RecvPostMessage(const ClonedMessageData& aData) override;
|
2015-01-15 19:58:40 +03:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
virtual mozilla::ipc::IPCResult RecvClose() override;
|
2015-01-15 19:58:40 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
2015-01-15 19:58:40 +03:00
|
|
|
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<BroadcastChannelService> mService;
|
2016-05-30 11:48:40 +03:00
|
|
|
const nsString mOriginChannelKey;
|
2015-01-15 19:58:40 +03:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2015-01-15 19:58:40 +03:00
|
|
|
|
|
|
|
#endif // mozilla_dom_BroadcastChannelParent_h
|