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

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

Issue 217423002: Removes Experimental hotword-always-on feature. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/resources/app_list/start_page.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c37d1a12d0b3aaa6d2dced4e4b440ebc786ebc7c..6c3673a3dd2406f8f2dd53fef4159b7db4456d0c 100644
--- a/chrome/browser/resources/app_list/speech_manager.js
+++ b/chrome/browser/resources/app_list/speech_manager.js
@@ -85,7 +85,6 @@ cr.define('speech', function() {
this.pluginManager_.stopRecognizer();
this.setState_(SpeechState.READY);
}
- chrome.send('setHotwordRecognizerState', [true]);
};
/**
@@ -181,21 +180,23 @@ cr.define('speech', function() {
return;
document.body.removeChild(recognizer);
this.pluginManager_ = null;
- chrome.send('setHotwordRecognizerState', [false]);
if (this.state == SpeechState.HOTWORD_RECOGNIZING)
this.setState(SpeechState.READY);
}
};
/**
- * Starts the hotword recognizer.
+ * Called when the app-list bubble is shown.
*/
- SpeechManager.prototype.startHotwordRecognition = function() {
+ SpeechManager.prototype.onShown = function() {
+ this.shown_ = true;
if (!this.pluginManager_)
return;
- if (this.state == SpeechState.HOTWORD_RECOGNIZING)
+ if (this.state == SpeechState.HOTWORD_RECOGNIZING) {
+ console.warn('Already in recognition state...');
return;
+ }
this.pluginManager_.startRecognizer();
this.audioManager_.start();
@@ -203,30 +204,6 @@ cr.define('speech', function() {
};
/**
- * Stops the hotword recognizer.
- */
- SpeechManager.prototype.stopHotwordRecognition = function() {
- if (!this.pluginManager_)
- return;
-
- if (this.state != SpeechState.HOTWORD_RECOGNIZING)
- return;
-
- this.pluginManager_.stopRecognizer();
- this.audioManager_.stop();
- this.setState_(SpeechState.READY);
- };
-
- /**
- * Called when the app-list bubble is shown.
- */
- SpeechManager.prototype.onShown = function() {
- this.shown_ = true;
- if (this.state == SpeechState.READY)
- this.startHotwordRecognition();
- };
-
- /**
* Called when the app-list bubble is hidden.
*/
SpeechManager.prototype.onHidden = function() {
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/resources/app_list/start_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698