chromium/third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module blink.mojom;

import "third_party/blink/public/mojom/script/script_type.mojom";
import "url/mojom/url.mojom";

// Represents ServiceWorkerUpdateViaCache enum for ServiceWorkerRegistrationOptions:
// https://w3c.github.io/ServiceWorker/#enumdef-serviceworkerupdateviacache
enum ServiceWorkerUpdateViaCache {
  kImports,
  kAll,
  kNone,
};

// Represents options for register():
// https://w3c.github.io/ServiceWorker/#dictdef-registrationoptions
struct ServiceWorkerRegistrationOptions {
  url.mojom.Url scope;
  ScriptType type = kClassic;
  ServiceWorkerUpdateViaCache update_via_cache = kImports;
};