no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / serviceworkers / ServiceWorkerRegisterJob.h
blobab4259e606f765a0572d4cdf833ca9f66243bdf2
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 #ifndef mozilla_dom_serviceworkerregisterjob_h
8 #define mozilla_dom_serviceworkerregisterjob_h
10 #include "ServiceWorkerUpdateJob.h"
12 namespace mozilla::dom {
14 // The register job. This implements the steps in the spec Register algorithm,
15 // but then uses ServiceWorkerUpdateJob to implement the Update and Install
16 // spec algorithms.
17 class ServiceWorkerRegisterJob final : public ServiceWorkerUpdateJob {
18 public:
19 ServiceWorkerRegisterJob(nsIPrincipal* aPrincipal, const nsACString& aScope,
20 const nsACString& aScriptSpec,
21 ServiceWorkerUpdateViaCache aUpdateViaCache);
23 private:
24 // Implement the Register algorithm steps and then call the parent class
25 // Update() to complete the job execution.
26 virtual void AsyncExecute() override;
28 virtual ~ServiceWorkerRegisterJob();
31 } // namespace mozilla::dom
33 #endif // mozilla_dom_serviceworkerregisterjob_h