diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 22:46:52 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-10 22:46:52 +0000 |
commit | 210399f6f7eddbe934e8eaef79277d96fccb2e51 (patch) | |
tree | de6b320bc1008bafe6b489582fa32232582c52fc /chrome/browser/cocoa/speech_input_window_controller.mm | |
parent | 15d9c0c8432dc9b0bd700ebfdb5542534e7b2e00 (diff) | |
download | chromium_src-210399f6f7eddbe934e8eaef79277d96fccb2e51.zip chromium_src-210399f6f7eddbe934e8eaef79277d96fccb2e51.tar.gz chromium_src-210399f6f7eddbe934e8eaef79277d96fccb2e51.tar.bz2 |
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.*
Review URL: http://codereview.chromium.org/3352018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59166 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/speech_input_window_controller.mm')
-rw-r--r-- | chrome/browser/cocoa/speech_input_window_controller.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/cocoa/speech_input_window_controller.mm b/chrome/browser/cocoa/speech_input_window_controller.mm index 1efb3f4..24d7cfe 100644 --- a/chrome/browser/cocoa/speech_input_window_controller.mm +++ b/chrome/browser/cocoa/speech_input_window_controller.mm @@ -63,7 +63,7 @@ const int kBubbleHorizontalMargin = 15; // Space on either sides of controls. } - (IBAction)cancel:(id)sender { - delegate_->RecognitionCancelled(); + delegate_->InfoBubbleButtonClicked(SpeechInputBubble::BUTTON_CANCEL); } // Calculate the window dimensions to reflect the sum height and max width of @@ -123,7 +123,7 @@ const int kBubbleHorizontalMargin = 15; // Space on either sides of controls. } - (void)windowWillClose:(NSNotification*)notification { - delegate_->InfoBubbleClosed(); + delegate_->InfoBubbleFocusChanged(); } @end // implementation SpeechInputWindowController |