chromium/components/services/storage/public/mojom/partition.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 storage.mojom;

import "components/services/storage/public/mojom/local_storage_control.mojom";
import "components/services/storage/public/mojom/origin_context.mojom";
import "components/services/storage/public/mojom/service_worker_storage_control.mojom";
import "components/services/storage/public/mojom/session_storage_control.mojom";
import "url/mojom/origin.mojom";

// Partition controls an isolated storage partition owned by the Storage
// Service. This is analogous to the browser's own storage partition concept.
interface Partition {
  // Binds a new OriginContext scoped to |origin| within this Partition.
  BindOriginContext(url.mojom.Origin origin,
                    pending_receiver<OriginContext> receiver);

  // Binds the main control interface for Session Storage in this partition.
  BindSessionStorageControl(pending_receiver<SessionStorageControl> receiver);

  // Binds the main control interface for Local Storage in this partition.
  BindLocalStorageControl(pending_receiver<LocalStorageControl> receiver);

  // Binds the main control interface for Service Worker Storage in this
  // partition.
  BindServiceWorkerStorageControl(
      pending_receiver<ServiceWorkerStorageControl> receiver);
};