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

Side by Side Diff: chrome/browser/resources/app_list/speech_manager.js

Issue 159973004: Adds speech recognition test case to AppListStartPageWebUITest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/webui/app_list/start_page_browsertest.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview The class to Manage both offline / online speech recognition. 6 * @fileoverview The class to Manage both offline / online speech recognition.
7 */ 7 */
8 8
9 <include src="plugin_manager.js"/> 9 <include src="plugin_manager.js"/>
10 <include src="audio_manager.js"/> 10 <include src="audio_manager.js"/>
(...skipping 26 matching lines...) Expand all
37 this.setState_(SpeechState.READY); 37 this.setState_(SpeechState.READY);
38 } 38 }
39 39
40 /** 40 /**
41 * Updates the state. 41 * Updates the state.
42 * 42 *
43 * @param {SpeechState} newState The new state. 43 * @param {SpeechState} newState The new state.
44 * @private 44 * @private
45 */ 45 */
46 SpeechManager.prototype.setState_ = function(newState) { 46 SpeechManager.prototype.setState_ = function(newState) {
47 if (this.state == newState)
48 return;
49
47 this.state = newState; 50 this.state = newState;
48 chrome.send('setSpeechRecognitionState', [this.state]); 51 chrome.send('setSpeechRecognitionState', [this.state]);
49 }; 52 };
50 53
51 /** 54 /**
52 * Called with the mean audio level when audio data arrives. 55 * Called with the mean audio level when audio data arrives.
53 * 56 *
54 * @param {cr.event.Event} event The event object for the audio data. 57 * @param {cr.event.Event} event The event object for the audio data.
55 * @private 58 * @private
56 */ 59 */
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (this.audioManager_.state == speech.AudioState.STOPPED) 238 if (this.audioManager_.state == speech.AudioState.STOPPED)
236 this.audioManager_.start(); 239 this.audioManager_.start();
237 this.speechRecognitionManager_.start(); 240 this.speechRecognitionManager_.start();
238 } 241 }
239 }; 242 };
240 243
241 return { 244 return {
242 SpeechManager: SpeechManager 245 SpeechManager: SpeechManager
243 }; 246 };
244 }); 247 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/app_list/start_page_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698