tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ServiceWorkerRegisterJob.h (1321B)


      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 mozilla_dom_serviceworkerregisterjob_h
      8 #define mozilla_dom_serviceworkerregisterjob_h
      9 
     10 #include "ServiceWorkerUpdateJob.h"
     11 
     12 namespace mozilla::dom {
     13 
     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(
     20      nsIPrincipal* aPrincipal, const nsACString& aScope,
     21      const WorkerType& aType, const nsACString& aScriptSpec,
     22      ServiceWorkerUpdateViaCache aUpdateViaCache,
     23      const ServiceWorkerLifetimeExtension& aLifetimeExtension);
     24 
     25 private:
     26  WorkerType mType;
     27 
     28  // Implement the Register algorithm steps and then call the parent class
     29  // Update() to complete the job execution.
     30  virtual void AsyncExecute() override;
     31 
     32  virtual ~ServiceWorkerRegisterJob();
     33 };
     34 
     35 }  // namespace mozilla::dom
     36 
     37 #endif  // mozilla_dom_serviceworkerregisterjob_h