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

Issue 3352018: Show error messages in speech bubble allowing user to retry as well. (Closed)

Created:
10 years, 3 months ago by Satish
Modified:
9 years, 7 months ago
Reviewers:
joth, jorlow
CC:
chromium-reviews, Paweł Hajdan Jr., pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

We used to show error messages as info bars earlier. Based on UX feedback, we now show the messages within the speech input UI bubble. We also let the user retry recognition without returning the error to the web page unless the user clicked the cancel button or closed the bubble. For this to work, we now keep the request alive in the SpeechInputManager map until it completes successfully or user explicitly cancelled it. We also keep the SpeechInputBubble object alive, even when the actual bubble window is not visible on screen, and construct the window if required whenever we want to show the recording status or error message on screen. BUG=53598 TEST=unit_tests --gtest_filter=SpeechInputBubbleControllerTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=59166

Patch Set 1 : . #

Total comments: 18

Patch Set 2 : Address joth's comments. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+434 lines, -173 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +11 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/speech_input_window_controller.mm View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/speech/speech_input_bubble.h View 1 5 chunks +66 lines, -7 lines 0 comments Download
M chrome/browser/speech/speech_input_bubble.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
M chrome/browser/speech/speech_input_bubble_controller.h View 1 3 chunks +36 lines, -15 lines 1 comment Download
M chrome/browser/speech/speech_input_bubble_controller.cc View 1 4 chunks +73 lines, -27 lines 2 comments Download
M chrome/browser/speech/speech_input_bubble_controller_unittest.cc View 1 7 chunks +88 lines, -23 lines 0 comments Download
M chrome/browser/speech/speech_input_bubble_gtk.cc View 1 3 chunks +19 lines, -10 lines 0 comments Download
M chrome/browser/speech/speech_input_bubble_mac.mm View 1 2 chunks +17 lines, -4 lines 0 comments Download
M chrome/browser/speech/speech_input_bubble_views.cc View 1 6 chunks +24 lines, -4 lines 0 comments Download
M chrome/browser/speech/speech_input_manager.cc View 1 9 chunks +69 lines, -69 lines 0 comments Download
M chrome/browser/speech/speech_recognizer.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/speech/speech_recognizer.cc View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/speech/speech_recognizer_unittest.cc View 3 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Satish
10 years, 3 months ago (2010-09-10 11:58:40 UTC) #1
Satish
10 years, 3 months ago (2010-09-10 13:16:45 UTC) #2
joth
I'm not entirely confident about reviewing the Views changes, not sure who the original reviewer ...
10 years, 3 months ago (2010-09-10 14:11:03 UTC) #3
Satish
Thanks for the quick review. I have addressed all the comments with no exception. Some ...
10 years, 3 months ago (2010-09-10 16:54:46 UTC) #4
joth
LGTM Just 2 minor comments.. http://codereview.chromium.org/3352018/diff/16001/17005 File chrome/browser/speech/speech_input_bubble_controller.cc (right): http://codereview.chromium.org/3352018/diff/16001/17005#newcode70 chrome/browser/speech/speech_input_bubble_controller.cc:70: } you could factor ...
10 years, 3 months ago (2010-09-10 17:08:40 UTC) #5
Satish
http://codereview.chromium.org/3352018/diff/16001/17005 File chrome/browser/speech/speech_input_bubble_controller.cc (right): http://codereview.chromium.org/3352018/diff/16001/17005#newcode70 chrome/browser/speech/speech_input_bubble_controller.cc:70: } On 2010/09/10 17:08:40, joth wrote: > you could ...
10 years, 3 months ago (2010-09-10 17:12:11 UTC) #6
joth
10 years, 3 months ago (2010-09-13 15:45:28 UTC) #7
On 10 September 2010 18:12, <satish@chromium.org> wrote:

>
> http://codereview.chromium.org/3352018/diff/16001/17005
> File chrome/browser/speech/speech_input_bubble_controller.cc (right):
>
> http://codereview.chromium.org/3352018/diff/16001/17005#newcode70
> chrome/browser/speech/speech_input_bubble_controller.cc:70: }
> On 2010/09/10 17:08:40, joth wrote:
>
>> you could factor this into SetBubbleRecordingModeOrMessage too
>>
>
> I want readers of this code to recognise that this method can be called
> from any thread and does the right thing, hence did not want to move
> that check-and-post to a sub function.
>
>
OK then.
Reason I mention this is constructing a member function pointer takes a
surprising amount of object code, so I always look for ways to share such
code.

Powered by Google App Engine
This is Rietveld 408576698