2018-07-10 02:02:39 +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: */
|
|
|
|
/* 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_serviceworkerregistrationparent_h__
|
|
|
|
#define mozilla_dom_serviceworkerregistrationparent_h__
|
|
|
|
|
|
|
|
#include "mozilla/dom/PServiceWorkerRegistrationParent.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class IPCServiceWorkerRegistrationDescriptor;
|
2018-07-10 02:02:40 +03:00
|
|
|
class ServiceWorkerRegistrationProxy;
|
2018-07-10 02:02:39 +03:00
|
|
|
|
|
|
|
class ServiceWorkerRegistrationParent final
|
|
|
|
: public PServiceWorkerRegistrationParent {
|
2018-07-10 02:02:40 +03:00
|
|
|
RefPtr<ServiceWorkerRegistrationProxy> mProxy;
|
|
|
|
bool mDeleteSent;
|
|
|
|
|
2020-10-23 14:52:49 +03:00
|
|
|
~ServiceWorkerRegistrationParent();
|
|
|
|
|
2018-07-10 02:02:39 +03:00
|
|
|
// PServiceWorkerRegistrationParent
|
|
|
|
void ActorDestroy(ActorDestroyReason aReason) override;
|
|
|
|
|
|
|
|
mozilla::ipc::IPCResult RecvTeardown() override;
|
|
|
|
|
2018-07-10 02:02:40 +03:00
|
|
|
mozilla::ipc::IPCResult RecvUnregister(
|
|
|
|
UnregisterResolver&& aResolver) override;
|
|
|
|
|
2020-01-08 06:21:27 +03:00
|
|
|
mozilla::ipc::IPCResult RecvUpdate(const nsCString& aNewestWorkerScriptUrl,
|
|
|
|
UpdateResolver&& aResolver) override;
|
2018-07-10 02:02:40 +03:00
|
|
|
|
2021-06-10 09:01:27 +03:00
|
|
|
mozilla::ipc::IPCResult RecvSetNavigationPreloadEnabled(
|
|
|
|
const bool& aEnabled,
|
|
|
|
SetNavigationPreloadEnabledResolver&& aResolver) override;
|
|
|
|
|
|
|
|
mozilla::ipc::IPCResult RecvSetNavigationPreloadHeader(
|
|
|
|
const nsCString& aHeader,
|
|
|
|
SetNavigationPreloadHeaderResolver&& aResolver) override;
|
|
|
|
|
|
|
|
mozilla::ipc::IPCResult RecvGetNavigationPreloadState(
|
|
|
|
GetNavigationPreloadStateResolver&& aResolver) override;
|
|
|
|
|
2018-07-10 02:02:39 +03:00
|
|
|
public:
|
2020-10-23 14:52:49 +03:00
|
|
|
NS_INLINE_DECL_REFCOUNTING(ServiceWorkerRegistrationParent, override);
|
|
|
|
|
2018-07-10 02:02:40 +03:00
|
|
|
ServiceWorkerRegistrationParent();
|
2018-07-10 02:02:39 +03:00
|
|
|
|
|
|
|
void Init(const IPCServiceWorkerRegistrationDescriptor& aDescriptor);
|
2018-07-10 02:02:40 +03:00
|
|
|
|
|
|
|
void MaybeSendDelete();
|
2018-07-10 02:02:39 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_serviceworkerregistrationparent_h__
|