// 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. // Use the chrome.os.management API to manage ChromeOS settings. [implemented_in = "chrome/browser/chromeos/extensions/telemetry/api/management/management_api.h"] namespace os.management { // Note: Please update documentation as well when this interface is changed. // The documentation lives here: //docs/telemetry_extension/api_overview.md. // LINT.IfChange dictionary SetAudioGainArguments { // Node id of the audio device to be configured. double nodeId; // Target gain percent in [0, 100]. Sets to 0 or 100 if outside. long gain; }; dictionary SetAudioVolumeArguments { // Node id of the audio device to be configured. double nodeId; // Target volume percent in [0, 100]. Sets to 0 or 100 if outside. long volume; // Whether to mute the device. boolean isMuted; }; callback OperationCallback = void(boolean isSuccess); interface Functions { // Sets the specified input audio device's gain to value. Returns false if // |args.nodeId| is invalid. static void setAudioGain( SetAudioGainArguments args, OperationCallback callback); // Sets the specified output audio device's volume and mute state to the // given value. Returns false if |args.nodeId| is invalid. static void setAudioVolume( SetAudioVolumeArguments args, OperationCallback callback); }; // LINT.ThenChange(/docs/telemetry_extension/api_overview.md) // The following is an empty definition, since the IDL compiler only accepts // comments over valid definitions. callback EOF = void(); };