Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Issue 2578473002: chrome.audio API: treat mute as system wide property (Closed)

Created:
4 years ago by tbarzic
Modified:
3 years, 11 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, alemate+watch_chromium.org, sadrul, achuith+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, kalyank, davemoore+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

chrome.audio API: treat mute as system wide property As part of audio API cleanup, simplify handling of mute flag. Current implementation has few problems: * Setting/getting mute state is done per device, even though mute is system property (on the other hand mute state listeners are not bound to a specific device). * Muting input or output is not intuitive - one would have to find an active device and set it's mute property - this would also set mute for all remaining active devices. This CL fixes these problems by decoupling mute state setter/getter from particular device properties, and bounding states to stream type. Additionally, StreamType enum is introduced - the type specifies type of stream an audio device supports (input or output) and is intended to replace existing isInput booleans used across the API. Existing methods for managing mute state are kept around, but will not be exposed to stable channel once the API is opened up (modulo current API whitelist). BUG=680358 Review-Url: https://codereview.chromium.org/2578473002 Cr-Commit-Position: refs/heads/master@{#446592} Committed: https://chromium.googlesource.com/chromium/src/+/7cb7db5ae23a21d9267ce2e707a7eb6a1389e66e

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 2

Patch Set 7 : with old mute event removed #

Patch Set 8 : . #

Patch Set 9 : . #

Total comments: 12

Patch Set 10 : . #

Patch Set 11 : rebase #

Patch Set 12 : . #

Patch Set 13 : . #

Total comments: 12

Patch Set 14 : . #

Total comments: 8

Patch Set 15 : . #

Patch Set 16 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+258 lines, -68 lines) Patch
M extensions/browser/api/audio/audio_api.h View 1 chunk +18 lines, -0 lines 0 comments Download
M extensions/browser/api/audio/audio_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +57 lines, -11 lines 0 comments Download
M extensions/browser/api/audio/audio_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +15 lines, -3 lines 0 comments Download
M extensions/browser/api/audio/audio_service.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +18 lines, -4 lines 0 comments Download
M extensions/browser/api/audio/audio_service_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +47 lines, -6 lines 0 comments Download
M extensions/browser/extension_function_histogram_value.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/common/api/audio.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +37 lines, -5 lines 0 comments Download
M extensions/test/data/api_test/audio/input_mute_change/background.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -10 lines 0 comments Download
M extensions/test/data/api_test/audio/output_mute_change/background.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -10 lines 0 comments Download
M extensions/test/data/api_test/audio/test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +50 lines, -19 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (34 generated)
tbarzic
Please take a look - note that I'm missing an owner for audio.idl, I'll deffer ...
4 years ago (2016-12-21 20:41:48 UTC) #18
tbarzic
https://codereview.chromium.org/2578473002/diff/100001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2578473002/diff/100001/extensions/common/api/audio.idl#newcode144 extensions/common/api/audio.idl:144: [deprecated="Use $(ref:onMuteStateChanged)."] Do you know if this one is ...
4 years ago (2016-12-22 01:29:56 UTC) #21
jennyz
+mnilsson@ for review. https://codereview.chromium.org/2578473002/diff/100001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2578473002/diff/100001/extensions/common/api/audio.idl#newcode144 extensions/common/api/audio.idl:144: [deprecated="Use $(ref:onMuteStateChanged)."] On 2016/12/22 01:29:56, tbarzic ...
3 years, 11 months ago (2017-01-10 00:47:53 UTC) #27
tbarzic
https://codereview.chromium.org/2578473002/diff/160001/extensions/browser/api/audio/audio_service_chromeos.cc File extensions/browser/api/audio/audio_service_chromeos.cc (right): https://codereview.chromium.org/2578473002/diff/160001/extensions/browser/api/audio/audio_service_chromeos.cc#newcode195 extensions/browser/api/audio/audio_service_chromeos.cc:195: return false; On 2017/01/10 00:47:53, jennyz wrote: > Combined ...
3 years, 11 months ago (2017-01-11 00:47:03 UTC) #28
jennyz
I saw your reply to my comments, but no the new patch with changes. Have ...
3 years, 11 months ago (2017-01-12 21:53:03 UTC) #30
tbarzic
oh, I must have - it's uploaded now :)
3 years, 11 months ago (2017-01-12 21:58:49 UTC) #31
jennyz
lgtm
3 years, 11 months ago (2017-01-18 00:53:05 UTC) #32
tbarzic
adding owners: isherman: histograms rdevlin.cronin: audio.idl
3 years, 11 months ago (2017-01-19 01:31:16 UTC) #34
Ilya Sherman
histograms.xml lgtm
3 years, 11 months ago (2017-01-19 01:58:57 UTC) #35
Devlin
https://codereview.chromium.org/2578473002/diff/240001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2578473002/diff/240001/extensions/common/api/audio.idl#newcode45 extensions/common/api/audio.idl:45: // Stream type associated with this device (input or ...
3 years, 11 months ago (2017-01-25 16:12:24 UTC) #36
tbarzic
https://codereview.chromium.org/2578473002/diff/240001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2578473002/diff/240001/extensions/common/api/audio.idl#newcode45 extensions/common/api/audio.idl:45: // Stream type associated with this device (input or ...
3 years, 11 months ago (2017-01-25 19:32:29 UTC) #37
Devlin
audio.idl lgtm with nits https://codereview.chromium.org/2578473002/diff/260001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2578473002/diff/260001/extensions/common/api/audio.idl#newcode51 extensions/common/api/audio.idl:51: // "AOKR", and "OTHER". unrelated ...
3 years, 11 months ago (2017-01-25 21:35:04 UTC) #38
tbarzic
https://codereview.chromium.org/2578473002/diff/260001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2578473002/diff/260001/extensions/common/api/audio.idl#newcode51 extensions/common/api/audio.idl:51: // "AOKR", and "OTHER". On 2017/01/25 21:35:03, Devlin (catching ...
3 years, 11 months ago (2017-01-25 22:35:49 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2578473002/300001
3 years, 11 months ago (2017-01-25 22:55:57 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/220456)
3 years, 11 months ago (2017-01-26 02:13:40 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2578473002/300001
3 years, 11 months ago (2017-01-26 02:19:33 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/220665)
3 years, 11 months ago (2017-01-26 05:25:15 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2578473002/300001
3 years, 11 months ago (2017-01-27 02:27:45 UTC) #50
commit-bot: I haz the power
3 years, 11 months ago (2017-01-27 04:31:37 UTC) #53
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://chromium.googlesource.com/chromium/src/+/7cb7db5ae23a21d9267ce2e707a7...

Powered by Google App Engine
This is Rietveld 408576698