// 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 video_capture.mojom;
import "url/mojom/origin.mojom";
// Next MinVersion: 2
// The MultiCaptureService is used as a communication channel between the
// browser process and ash to inform about new / ending
// multi capture events so that appropriate usage indicators can
// be shown to the users.
[EnableIf=is_chromeos]
interface MultiCaptureService {
// Adds an observer for multi capture events.
AddObserver(pending_remote<MultiCaptureServiceClient> observer);
};
// The MultiCaptureServiceClient is used to receive new / ending multi
// capture events in ash.
[EnableIf=is_chromeos]
interface MultiCaptureServiceClient {
// Called when a new multi capture is started. This event provides a unique
// label and the origin that triggered the capture.
MultiCaptureStarted(string label, url.mojom.Origin origin);
// Called when a new multi capture is started. This event provides a unique
// label, the id of the app that made the call and the short name (derived
// from the app manifest or app title) of the app.
[MinVersion=1]MultiCaptureStartedFromApp(string label, string app_id,
string app_short_name);
// Called when an existing multi capture is stopped. This event provides a
// unique label. A multi capture is considered to be stopped when all used
// devices are closed.
MultiCaptureStopped(string label);
};