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

Issue 2675713002: Switch Speech Recognition to asynchronous callback-based AudioManager interactions. (Closed)

Created:
3 years, 10 months ago by o1ka
Modified:
3 years, 10 months ago
CC:
chromium-reviews, jam, darin-cc_chromium.org, feature-media-reviews_chromium.org, audio-mojo-cl_google.com, Max Morin, DaleCurtis, ossu-chromium
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Switch Speech Recognition to asynchronous callback-based AudioManager interactions. 1) This introduces AudioSystem, which provides an asynchronous interface to AudioManager and eventually will replace AudioManager. The plan is to gradually populate it with all the required methods and switch all AudioManager clients to it, in preparation for moving AudioManager functionality to Mojo audio service. 2) SpeechRecognizerImpl now uses this interface, which required adding an extra state to its FSM. 3) SpeechRecognizerImpl unit tests are updated to take into account the new threading model and the new state. BUG=687981, 672468 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2675713002 Cr-Commit-Position: refs/heads/master@{#448273} Committed: https://chromium.googlesource.com/chromium/src/+/ef762c904b723cb488bad237300a5976c29327d3

Patch Set 1 #

Total comments: 3

Patch Set 2 : MockAudioManager::Deleter #

Patch Set 3 : rebase #

Patch Set 4 : another rebase! #

Total comments: 18

Patch Set 5 : review comments addressed #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+558 lines, -62 lines) Patch
M content/browser/browser_main_loop.h View 1 2 3 4 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 chunks +6 lines, -2 lines 2 comments Download
M content/browser/speech/speech_recognition_browsertest.cc View 1 3 chunks +10 lines, -3 lines 0 comments Download
M content/browser/speech/speech_recognition_manager_impl.h View 3 chunks +7 lines, -1 line 0 comments Download
M content/browser/speech/speech_recognition_manager_impl.cc View 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/speech/speech_recognizer_impl.h View 1 2 3 4 9 chunks +16 lines, -3 lines 0 comments Download
M content/browser/speech/speech_recognizer_impl.cc View 1 2 3 16 chunks +87 lines, -33 lines 0 comments Download
M content/browser/speech/speech_recognizer_impl_unittest.cc View 1 2 3 4 17 chunks +114 lines, -6 lines 0 comments Download
M media/audio/BUILD.gn View 2 chunks +4 lines, -0 lines 0 comments Download
A media/audio/audio_system.h View 1 2 3 4 1 chunk +37 lines, -0 lines 0 comments Download
A media/audio/audio_system_impl.h View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
A media/audio/audio_system_impl.cc View 1 2 3 4 1 chunk +70 lines, -0 lines 0 comments Download
A media/audio/audio_system_impl_unittest.cc View 1 2 3 4 1 chunk +99 lines, -0 lines 0 comments Download
M media/audio/mock_audio_manager.h View 1 4 chunks +20 lines, -4 lines 0 comments Download
M media/audio/mock_audio_manager.cc View 1 5 chunks +36 lines, -4 lines 0 comments Download

Messages

Total messages: 38 (23 generated)
o1ka
Tommi - PTAL.
3 years, 10 months ago (2017-02-02 15:34:12 UTC) #6
tommi (sloooow) - chröme
https://codereview.chromium.org/2675713002/diff/1/content/browser/speech/speech_recognizer_impl.cc File content/browser/speech/speech_recognizer_impl.cc (right): https://codereview.chromium.org/2675713002/diff/1/content/browser/speech/speech_recognizer_impl.cc#newcode562 content/browser/speech/speech_recognizer_impl.cc:562: GetAudioSystem()->GetInputStreamParameters( Instead of adding AudioSystem etc, could you post ...
3 years, 10 months ago (2017-02-02 16:27:18 UTC) #10
o1ka
On 2017/02/02 15:34:12, o1ka (CET) wrote: > Tommi - PTAL. Ok, there is an issue ...
3 years, 10 months ago (2017-02-02 16:27:51 UTC) #11
o1ka
https://codereview.chromium.org/2675713002/diff/1/media/audio/audio_system.h File media/audio/audio_system.h (right): https://codereview.chromium.org/2675713002/diff/1/media/audio/audio_system.h#newcode19 media/audio/audio_system.h:19: class MEDIA_EXPORT AudioSystem { On 2017/02/02 16:27:18, tommi (krómíum) ...
3 years, 10 months ago (2017-02-02 16:32:22 UTC) #12
o1ka
On 2017/02/02 16:27:51, o1ka (CET) wrote: > On 2017/02/02 15:34:12, o1ka (CET) wrote: > > ...
3 years, 10 months ago (2017-02-02 17:07:02 UTC) #13
o1ka
On 2017/02/02 17:07:02, o1ka (CET) wrote: > On 2017/02/02 16:27:51, o1ka (CET) wrote: > > ...
3 years, 10 months ago (2017-02-03 12:10:11 UTC) #17
tommi (sloooow) - chröme
https://codereview.chromium.org/2675713002/diff/80001/content/browser/speech/speech_recognizer_impl.cc File content/browser/speech/speech_recognizer_impl.cc (right): https://codereview.chromium.org/2675713002/diff/80001/content/browser/speech/speech_recognizer_impl.cc#newcode117 content/browser/speech/speech_recognizer_impl.cc:117: media::AudioSystem* SpeechRecognizerImpl::audio_system_for_tests_ = nullptr; Just checking - Is it ...
3 years, 10 months ago (2017-02-05 20:14:55 UTC) #21
tommi (sloooow) - chröme
given that all of my comments are minor (and assuming the commented out line, shouldn't ...
3 years, 10 months ago (2017-02-06 08:36:42 UTC) #22
o1ka
Thanks! The comments addressed. https://codereview.chromium.org/2675713002/diff/80001/content/browser/speech/speech_recognizer_impl.cc File content/browser/speech/speech_recognizer_impl.cc (right): https://codereview.chromium.org/2675713002/diff/80001/content/browser/speech/speech_recognizer_impl.cc#newcode117 content/browser/speech/speech_recognizer_impl.cc:117: media::AudioSystem* SpeechRecognizerImpl::audio_system_for_tests_ = nullptr; On ...
3 years, 10 months ago (2017-02-06 12:06:08 UTC) #25
o1ka
avi@chromium.org: Could you RS changes in content/browser/browser_main_loop.* ? Thanks!
3 years, 10 months ago (2017-02-06 14:01:35 UTC) #28
o1ka
mailto:avi@chromium.org: Could you RS changes in content/browser/browser_main_loop.* ? Thanks! (and now actually adding avi@ as ...
3 years, 10 months ago (2017-02-06 14:03:39 UTC) #30
Avi (use Gerrit)
lgtm https://codereview.chromium.org/2675713002/diff/100001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2675713002/diff/100001/content/browser/browser_main_loop.cc#newcode1541 content/browser/browser_main_loop.cc:1541: speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( base::MakeUnique?
3 years, 10 months ago (2017-02-06 16:14:21 UTC) #31
o1ka
Thanks! https://codereview.chromium.org/2675713002/diff/100001/content/browser/browser_main_loop.cc File content/browser/browser_main_loop.cc (right): https://codereview.chromium.org/2675713002/diff/100001/content/browser/browser_main_loop.cc#newcode1541 content/browser/browser_main_loop.cc:1541: speech_recognition_manager_.reset(new SpeechRecognitionManagerImpl( On 2017/02/06 16:14:21, Avi wrote: > ...
3 years, 10 months ago (2017-02-06 16:40:06 UTC) #32
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/2675713002/100001
3 years, 10 months ago (2017-02-06 16:41:04 UTC) #35
commit-bot: I haz the power
3 years, 10 months ago (2017-02-06 16:45:57 UTC) #38
Message was sent while issue was closed.
Committed patchset #5 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ef762c904b723cb488bad237300a...

Powered by Google App Engine
This is Rietveld 408576698