chromium/chromeos/crosapi/mojom/multi_capture_service.mojom

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

module crosapi.mojom;

import "url/mojom/url.mojom";

// Interacts with the media capture API. Implemented in ash-chrome. This
// interface is used to show multi capture related usage indicators and
// notifications.
// Next version: 4
// Next method id: 5
[Stable, Uuid="6ea59fc6-65e0-11ed-a200-7be727846002"]
interface MultiCaptureService {
  // Called when a new multi capture (identified by a unique label
  // representing the capture session) is started. The parameters
  // are a unique label and the host that triggered the capture.
  [MinVersion=0] MultiCaptureStarted@0(string label, string host);

  // Called when an existing multi capture (identified by a unique label
  // representing the capture session) is stopped. A multi capture is
  // considered to be stopped when the capture for all used devices is
  // stopped / finished.
  // MultiCaptureStopped will only be called after MultiCaptureStarted was
  // called before with the same label.
  [MinVersion=0] MultiCaptureStopped@1(string label);

  // Called when a new multi capture (identified by a unique label
  // representing the capture session) is started. The parameters
  // are a unique label, the app id and the name of the app that
  // triggered the capture.
  [MinVersion=1] MultiCaptureStartedFromApp@2(string label,
      string app_id, string app_name);

  // Checks whether a multi capture call is allowed from a certain origin.
  [MinVersion=2] IsMultiCaptureAllowed@3(url.mojom.Url url)
    => (bool is_allowed);

  // Checks whether any origin is permitted to perform multi screen capture
  // for the main profile.
  [MinVersion=3] IsMultiCaptureAllowedForAnyOriginOnMainProfile@4()
    => (bool is_allowed);
};