assistant_volume_control.mojom 824 B

123456789101112131415161718192021222324252627
  1. // Copyright 2018 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. module ash.mojom;
  5. // Interface to control system volume through Ash.
  6. interface AssistantVolumeControl {
  7. // Sets system volume to |volume|, which is between 0 - 100.
  8. SetVolume(int32 volume, bool user_initiated);
  9. // Sets mute state to |muted|.
  10. SetMuted(bool muted);
  11. // Adds volume observer. The observer will be immediately notified of volume
  12. // and mute status when added.
  13. AddVolumeObserver(pending_remote<VolumeObserver> observer);
  14. };
  15. // Observes volume state changes.
  16. interface VolumeObserver {
  17. // Called when volume is updated.
  18. OnVolumeChanged(int32 volume);
  19. // Called when mute state changed.
  20. OnMuteStateChanged(bool muted);
  21. };