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

Issue 2605983002: Simplify logic behind chrome.audio.setActiveDevices (Closed)

Created:
3 years, 11 months ago by tbarzic
Modified:
3 years, 11 months ago
Reviewers:
Devlin, Ilya Sherman, jennyz
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, oshima+watch_chromium.org, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify logic behind chrome.audio.setActiveDevices Main updates: * Explicitly separates input and output device lists, which makes setting only one set of devices more intuitive. This is achieved by introducing DeviceIdLists object that can be used as method argument. * Provides a way to clear active devices - by setting active device lists to an empty list. Old setActiveDevices method would not change set of active input/output devices if no input/output devices were added to the list of active device IDs. Note that the old logic is preserved not to break current clients but will eventually be removed. Old logic can be triggered by passing list of device IDs as array of strings rather than a newly introduced |DeviceIdLists| object. The CL adds new public methods to CrasAudioHandler to support new way of setting active devices: SetActiveInputNodes and SetActiveOutputNodes. These methods are tested by replicating test cases for ChangeActiveNodes - replacing calls To ChangeActiveNodes with new methods. BUG=680361 Review-Url: https://codereview.chromium.org/2605983002 Cr-Commit-Position: refs/heads/master@{#444178} Committed: https://chromium.googlesource.com/chromium/src/+/cae06e2aab96be77610c27f4a1469f9570df1c3c

Patch Set 1 #

Patch Set 2 : set active devices #

Patch Set 3 : make CrasAudioHandler methods not virtual #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : . #

Total comments: 20

Patch Set 7 : . #

Patch Set 8 : rebase #

Patch Set 9 : . #

Total comments: 2

Patch Set 10 : . #

Patch Set 11 : . #

Total comments: 4

Patch Set 12 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+764 lines, -161 lines) Patch
M chromeos/audio/cras_audio_handler.h View 1 2 3 4 5 6 4 chunks +58 lines, -41 lines 0 comments Download
M chromeos/audio/cras_audio_handler.cc View 1 2 3 1 chunk +26 lines, -3 lines 0 comments Download
M chromeos/audio/cras_audio_handler_unittest.cc View 1 2 3 4 5 6 7 14 chunks +433 lines, -53 lines 0 comments Download
M extensions/browser/api/audio/audio_api.cc View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -1 line 0 comments Download
M extensions/browser/api/audio/audio_service.h View 1 2 3 4 5 6 2 chunks +15 lines, -0 lines 0 comments Download
M extensions/browser/api/audio/audio_service.cc View 2 chunks +9 lines, -0 lines 0 comments Download
M extensions/browser/api/audio/audio_service_chromeos.cc View 1 2 3 4 5 6 5 chunks +65 lines, -26 lines 0 comments Download
M extensions/common/api/audio.idl View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +28 lines, -14 lines 0 comments Download
M extensions/test/data/api_test/audio/test.js View 1 2 3 4 5 6 7 8 9 6 chunks +118 lines, -23 lines 0 comments Download

Messages

Total messages: 45 (33 generated)
tbarzic
3 years, 11 months ago (2016-12-29 02:22:36 UTC) #9
jennyz
https://codereview.chromium.org/2605983002/diff/100001/chromeos/audio/cras_audio_handler.h File chromeos/audio/cras_audio_handler.h (right): https://codereview.chromium.org/2605983002/diff/100001/chromeos/audio/cras_audio_handler.h#newcode216 chromeos/audio/cras_audio_handler.h:216: // DEPRECATED in favour of |SetActiveInputNodes| and |SetActiveOutputNodes|. nit: ...
3 years, 11 months ago (2017-01-07 00:33:00 UTC) #12
tbarzic
https://codereview.chromium.org/2605983002/diff/100001/chromeos/audio/cras_audio_handler.h File chromeos/audio/cras_audio_handler.h (right): https://codereview.chromium.org/2605983002/diff/100001/chromeos/audio/cras_audio_handler.h#newcode216 chromeos/audio/cras_audio_handler.h:216: // DEPRECATED in favour of |SetActiveInputNodes| and |SetActiveOutputNodes|. On ...
3 years, 11 months ago (2017-01-07 05:16:32 UTC) #19
jennyz
lgtm
3 years, 11 months ago (2017-01-12 21:49:47 UTC) #23
tbarzic
adding owners for histograms and audio.idl
3 years, 11 months ago (2017-01-13 01:05:29 UTC) #25
Ilya Sherman
histograms.xml lgtm
3 years, 11 months ago (2017-01-13 01:44:19 UTC) #26
Devlin
https://codereview.chromium.org/2605983002/diff/160001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2605983002/diff/160001/extensions/common/api/audio.idl#newcode105 extensions/common/api/audio.idl:105: static void setActiveDeviceLists(DeviceIdLists ids, EmptyCallback callback); Could we instead ...
3 years, 11 months ago (2017-01-13 16:11:01 UTC) #27
tbarzic
https://codereview.chromium.org/2605983002/diff/160001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2605983002/diff/160001/extensions/common/api/audio.idl#newcode105 extensions/common/api/audio.idl:105: static void setActiveDeviceLists(DeviceIdLists ids, EmptyCallback callback); On 2017/01/13 16:11:00, ...
3 years, 11 months ago (2017-01-13 18:52:49 UTC) #29
Devlin
idl lgtm https://codereview.chromium.org/2605983002/diff/200001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2605983002/diff/200001/extensions/common/api/audio.idl#newcode91 extensions/common/api/audio.idl:91: // |ids|: <p>Specifies IDs of devices that ...
3 years, 11 months ago (2017-01-17 21:05:39 UTC) #34
tbarzic
https://codereview.chromium.org/2605983002/diff/200001/extensions/common/api/audio.idl File extensions/common/api/audio.idl (right): https://codereview.chromium.org/2605983002/diff/200001/extensions/common/api/audio.idl#newcode91 extensions/common/api/audio.idl:91: // |ids|: <p>Specifies IDs of devices that should be ...
3 years, 11 months ago (2017-01-17 21:40:25 UTC) #35
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/2605983002/220001
3 years, 11 months ago (2017-01-17 23:07:24 UTC) #42
commit-bot: I haz the power
3 years, 11 months ago (2017-01-17 23:15:27 UTC) #45
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/cae06e2aab96be77610c27f4a146...

Powered by Google App Engine
This is Rietveld 408576698