chromium/third_party/blink/public/mojom/blob/file_backed_blob_factory.mojom

// Copyright 2023 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/blob/blob.mojom";
import "third_party/blink/public/mojom/blob/data_element.mojom";

// This interface is implemented by the browser to give renderers the ability
// to register a file backed blob and capture the URL from which it is accessed.
// This interface is channel-associated (for frames).
interface FileBackedBlobFactory {
    // Registers a file backed blob.
    RegisterBlob(pending_receiver<blink.mojom.Blob> blob, string uuid,
        string content_type,
        blink.mojom.DataElementFile file);
    // Synchronous method for registering a file backed blob.
    [Sync] RegisterBlobSync(pending_receiver<blink.mojom.Blob> blob,
        string uuid, string content_type,
        blink.mojom.DataElementFile file) => ();
};