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

Unified Diff: chrome/browser/resources/app_list/speech_manager.js

Issue 55433002: Propagates the search result of start page to the app-list search box. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/app_list/speech_manager.js
diff --git a/chrome/browser/resources/app_list/speech_manager.js b/chrome/browser/resources/app_list/speech_manager.js
index 1c5f35d17c03776001901de3429dd048570ceebf..b316dd61329ce3e90d6e0ff2042f12d6ffc431e8 100644
--- a/chrome/browser/resources/app_list/speech_manager.js
+++ b/chrome/browser/resources/app_list/speech_manager.js
@@ -87,10 +87,12 @@ cr.define('speech', function() {
* @param {boolean} isFinal Whether the result is final or not.
*/
SpeechManager.prototype.onSpeechRecognized = function(result, isFinal) {
- // TODO(mukai): updates the UI, make requests, and/or sends the result
- // to the web_ui handler.
console.log('speech result: ' + result + ' ' +
(isFinal ? 'final' : 'interim'));
+ if (isFinal) {
+ chrome.send('search', [result]);
+ this.speechRecognitionManager_.stop();
+ }
};
/**
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/app_list_view_delegate.cc » ('j') | chrome/browser/ui/app_list/start_page_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698