| Index: chrome/browser/resources/hotword/nacl_manager.js
|
| diff --git a/chrome/browser/resources/hotword/nacl_manager.js b/chrome/browser/resources/hotword/nacl_manager.js
|
| index 0d2b9b9c9fe73c72b289104b32331ddae187a18a..fef432d409b495761c25293f02af6e738eb91d3d 100644
|
| --- a/chrome/browser/resources/hotword/nacl_manager.js
|
| +++ b/chrome/browser/resources/hotword/nacl_manager.js
|
| @@ -11,10 +11,12 @@ cr.define('hotword', function() {
|
| * shutdown.
|
| *
|
| * @param {boolean} loggingEnabled Whether audio logging is enabled.
|
| + * @param {boolean} hotwordStream Whether the audio input stream is from a
|
| + * hotword stream.
|
| * @constructor
|
| * @extends {cr.EventTarget}
|
| */
|
| -function NaClManager(loggingEnabled) {
|
| +function NaClManager(loggingEnabled, hotwordStream) {
|
| /**
|
| * Current state of this manager.
|
| * @private {hotword.NaClManager.ManagerState_}
|
| @@ -70,6 +72,12 @@ function NaClManager(loggingEnabled) {
|
| this.loggingEnabled_ = loggingEnabled;
|
|
|
| /**
|
| + * Whether the audio input stream is from a hotword stream.
|
| + * @private {boolean}
|
| + */
|
| + this.hotwordStream_ = hotwordStream;
|
| +
|
| + /**
|
| * Audio log of X seconds before hotword triggered.
|
| * @private {?Object}
|
| */
|
| @@ -432,6 +440,13 @@ NaClManager.prototype.handleRequestModel_ = function() {
|
| hotword.constants.NaClPlugin.LOG + ':' +
|
| hotword.constants.AUDIO_LOG_SECONDS);
|
| }
|
| +
|
| + // If the audio stream is from a hotword stream, tell the plugin.
|
| + if (this.hotwordStream_) {
|
| + this.sendDataToPlugin_(
|
| + hotword.constants.NaClPlugin.DSP + ':' +
|
| + hotword.constants.HOTWORD_STREAM_TIMEOUT_SECONDS);
|
| + }
|
| };
|
|
|
| /**
|
|
|