Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Next MinVersion: 3 | 5 // Next MinVersion: 4 |
| 6 | 6 |
| 7 module arc.mojom; | 7 module arc.mojom; |
| 8 | 8 |
| 9 // Use same switch values as kernel switch events. | 9 // Use same switch values as kernel switch events. |
| 10 [Extensible] | 10 [Extensible] |
| 11 enum AudioSwitch { | 11 enum AudioSwitch { |
| 12 SW_HEADPHONE_INSERT = 0x02, | 12 SW_HEADPHONE_INSERT = 0x02, |
| 13 SW_MICROPHONE_INSERT = 0x04 | 13 SW_MICROPHONE_INSERT = 0x04 |
| 14 }; | 14 }; |
| 15 | 15 |
| 16 // Next method ID:2 | |
| 16 interface AudioHost { | 17 interface AudioHost { |
| 17 // Tells the host to show the volume controls. | 18 // Tells the host to show the volume controls. |
| 18 ShowVolumeControls@0(); | 19 ShowVolumeControls@0(); |
| 20 | |
| 21 // Request that the volume be changed to |volume| | |
| 22 // |volume| is of the range [0, 100] | |
| 23 [MinVersion=3] OnVolumeUpdateRequest@1(float volume); | |
|
Luis Héctor Chávez
2017/04/13 14:21:25
nit: OnSystemVolumeUpdateRequest
Also mention tha
dcheng
2017/04/13 18:02:40
Can you clarify what that means? We have no way of
Luis Héctor Chávez
2017/04/13 18:05:40
Yes, we're trusting that the other side will only
yueli
2017/06/02 19:10:13
Done.
| |
| 19 }; | 24 }; |
| 20 | 25 |
| 21 // Next method ID: 3 | 26 // Next method ID: 3 |
| 22 interface AudioInstance { | 27 interface AudioInstance { |
| 23 // Establishes full-duplex communication with the host. | 28 // Establishes full-duplex communication with the host. |
| 24 [MinVersion=1] Init@1(AudioHost host); | 29 [MinVersion=1] Init@1(AudioHost host); |
| 25 | 30 |
| 26 // Notify plug states of headphone, microphone, etc. Each switch state is | 31 // Notify plug states of headphone, microphone, etc. Each switch state is |
| 27 // represented by the corresponding bit, if the bit is set then the switch | 32 // represented by the corresponding bit, if the bit is set then the switch |
| 28 // is plugged/inserted. | 33 // is plugged/inserted. |
| 29 NotifySwitchState@0(uint32 state); | 34 NotifySwitchState@0(uint32 state); |
| 30 | 35 |
| 31 // Notify volume and mute state. | 36 // Notify volume and mute state. |
| 32 // volume ranges from 0 to 100. | 37 // volume ranges from 0 to 100. |
| 33 // muted == true if audio is muted. | 38 // muted == true if audio is muted. |
| 34 [MinVersion=2] NotifyVolumeState@2(uint32 volume, bool muted); | 39 [MinVersion=2] NotifyVolumeState@2(uint32 volume, bool muted); |
| 35 }; | 40 }; |
| OLD | NEW |