chromium/third_party/blink/public/mojom/web_launch/web_launch.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/file_system_access/file_system_access_directory_handle.mojom";
import "url/mojom/url.mojom";

// Interface for getting the cause of page loads to blink. This service lives
// in blink and is used to implement the File Handling proposal:
// https://github.com/WICG/file-handling/blob/main/explainer.md
// TODO(crbug.com/829689): Replace link to explainer with link to spec, when
// available.
//
// An instance of this service is tied to a LocalFrame.
interface WebLaunchService {
  // Used to notify a frame that it was opened with |files|. This
  // method is fire-and-forget.
  SetLaunchFiles(array<FileSystemAccessEntry> files);

  // Used to notify a frame that it was opened as a web app. This method is
  // fire-and-forget.
  // TODO(crbug.com/1250225): Unify SetLaunchFiles() into this method.
  EnqueueLaunchParams(url.mojom.Url launch_url);
};