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

Issue 415933002: Turn webspeech on/off when tab goes fore/background (Closed)

Created:
6 years, 5 months ago by qinmin
Modified:
6 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam
Project:
chromium
Visibility:
Public.

Description

Turn webspeech on/off when tab goes fore/background This change adds a toggle to turn webspeech off when tab goes background. And further request to turn media capture devices on will be denied. So Both WebRTC and webSpeech won't be able to initiate new requests when tab is in background. This CL also fixed a bug in the original CL that was reverted: some times recognition will not be aborted immediately after screen lock. The issue is caused by that calling abort() will not delete the session in SpeechRecognitionManagerImpl. So if a SpeechRecognition objects calls multiple start(), several sessions with the same request_id will be created. And when passing the request_id to abort the sessions, only 1 session will be aborted This change requests the all sessions in the same render view to be aborted. Thus solving the above issue. BUG=396054 R=jochen@chromium.org, tsepez@chromium.org, xians@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285314

Patch Set 1 #

Total comments: 2

Patch Set 2 : Request->Requests #

Patch Set 3 : merge the previous change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -4 lines) Patch
M chrome/browser/media/media_stream_devices_controller.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/media/media_stream_devices_controller.cc View 1 2 3 chunks +12 lines, -2 lines 0 comments Download
M content/browser/speech/speech_recognition_dispatcher_host.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/speech/speech_recognition_dispatcher_host.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M content/common/speech_recognition_messages.h View 1 1 chunk +9 lines, -2 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/speech_recognition_dispatcher.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/speech_recognition_dispatcher.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
qinmin
Reviewers, please prioritize this code review. See more detail in the crbug. Thanks
6 years, 5 months ago (2014-07-24 02:57:55 UTC) #1
Tom Sepez
Messages LGTM. https://codereview.chromium.org/415933002/diff/1/content/common/speech_recognition_messages.h File content/common/speech_recognition_messages.h (right): https://codereview.chromium.org/415933002/diff/1/content/common/speech_recognition_messages.h#newcode83 content/common/speech_recognition_messages.h:83: IPC_MESSAGE_CONTROL1(SpeechRecognitionHostMsg_AbortAllRequest, nit: _AbortAllRequests (plural throughout all uses).
6 years, 5 months ago (2014-07-24 03:11:33 UTC) #2
qinmin
https://codereview.chromium.org/415933002/diff/1/content/common/speech_recognition_messages.h File content/common/speech_recognition_messages.h (right): https://codereview.chromium.org/415933002/diff/1/content/common/speech_recognition_messages.h#newcode83 content/common/speech_recognition_messages.h:83: IPC_MESSAGE_CONTROL1(SpeechRecognitionHostMsg_AbortAllRequest, On 2014/07/24 03:11:33, Tom Sepez wrote: > nit: ...
6 years, 5 months ago (2014-07-24 03:15:59 UTC) #3
jochen (gone - plz use gerrit)
please add a test for this, separate CL is ok if you want to merge ...
6 years, 5 months ago (2014-07-24 08:49:54 UTC) #4
no longer working on chromium
Hi Min, I took a look at the speech code together with burnik, but it ...
6 years, 5 months ago (2014-07-24 12:36:45 UTC) #5
qinmin
Hi, xians, here is the observed problem: Take a look at the Javascript on https://www.standardabweichung.de/design/projekte/html5/chrome-android-mic-security-check ...
6 years, 5 months ago (2014-07-24 13:52:37 UTC) #6
qinmin
ok, merged the previous CL into this CL as it is reverted
6 years, 5 months ago (2014-07-24 14:45:37 UTC) #7
no longer working on chromium
On 2014/07/24 14:45:37, qinmin wrote: > ok, merged the previous CL into this CL as ...
6 years, 5 months ago (2014-07-24 15:18:23 UTC) #8
no longer working on chromium
The CQ bit was checked by xians@chromium.org
6 years, 5 months ago (2014-07-24 15:19:08 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qinmin@chromium.org/415933002/40001
6 years, 5 months ago (2014-07-24 15:20:48 UTC) #10
qinmin
6 years, 5 months ago (2014-07-24 17:42:01 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 manually as r285314 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698