Source code

Revision control

Other Tools

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/. */
6
7
#ifndef moz_dom_ServiceWorkerContainerProxy_h
8
#define moz_dom_ServiceWorkerContainerProxy_h
9
10
namespace mozilla {
11
namespace dom {
12
13
class ServiceWorkerContainerParent;
14
15
class ServiceWorkerContainerProxy final {
16
// Background thread only
17
ServiceWorkerContainerParent* mActor;
18
19
~ServiceWorkerContainerProxy();
20
21
public:
22
explicit ServiceWorkerContainerProxy(ServiceWorkerContainerParent* aActor);
23
24
void RevokeActor(ServiceWorkerContainerParent* aActor);
25
26
RefPtr<ServiceWorkerRegistrationPromise> Register(
27
const ClientInfo& aClientInfo, const nsCString& aScopeURL,
28
const nsCString& aScriptURL, ServiceWorkerUpdateViaCache aUpdateViaCache);
29
30
RefPtr<ServiceWorkerRegistrationPromise> GetRegistration(
31
const ClientInfo& aClientInfo, const nsCString& aURL);
32
33
RefPtr<ServiceWorkerRegistrationListPromise> GetRegistrations(
34
const ClientInfo& aClientInfo);
35
36
RefPtr<ServiceWorkerRegistrationPromise> GetReady(
37
const ClientInfo& aClientInfo);
38
39
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ServiceWorkerContainerProxy);
40
};
41
42
} // namespace dom
43
} // namespace mozilla
44
45
#endif // moz_dom_ServiceWorkerContainerProxy_h