Fixed the speech crash when the render view has gone away then users click "try again".

After a speech recognition session is done, chrome will pop up a bubble to allow users to choose "cancel" or "try again".
If the users choose "try again", it will use the last session's SpeechRecognitionSessionConfig which is stored in ChromeSpeechRecognitionManagerDelegate to create a new session.
But the render view might have gone away if the page is automatically refreshed to another url. Then the event_listener in the SpeechRecognitionSessionConfig is not valid anymore and should not be used.

This patch added a OnAbortSessionsForListener callback from SpeechRecognitionManagerImpl to ChromeSpeechRecognitionManagerDelegate to notify chrome we should not try to restore the session for "try again" event.

BUG=222000
TEST=open the PoC.html in the issue, click on the page and then click on "try again" button.

Review URL: https://chromiumcodereview.appspot.com/12982009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192299 0039d316-1c4b-4281-b951-d872f2087c98
1 file changed