Index: chrome/browser/resources/hotword/state_manager.js |
diff --git a/chrome/browser/resources/hotword/state_manager.js b/chrome/browser/resources/hotword/state_manager.js |
index 2727cbcd8af7cf76ee799f1d8790d071e2cc9d3a..9cf207de834c2d662698b1ef0ee1cd1f623d147f 100644 |
--- a/chrome/browser/resources/hotword/state_manager.js |
+++ b/chrome/browser/resources/hotword/state_manager.js |
@@ -43,8 +43,18 @@ cr.define('hotword', function() { |
*/ |
this.sessionStartedCb_ = null; |
+ /** |
+ * Hotword trigger audio notification... a.k.a The Chime (tm) |
rpetterson
2014/09/16 07:55:45
nit: end with period.
|
+ * @private {!Audio} |
+ */ |
+ this.chime_ = document.createElement('audio'); |
+ |
// Get the initial status. |
chrome.hotwordPrivate.getStatus(this.handleStatus_.bind(this)); |
+ |
+ // Setup the chime and insert into the page. |
+ this.chime_.src = chrome.extension.getURL('chime.wav'); |
+ document.body.appendChild(this.chime_); |
} |
/** |
@@ -227,6 +237,9 @@ cr.define('hotword', function() { |
// Detector implicitly stops when the hotword is detected. |
this.state_ = State_.STOPPED; |
+ // Play the chime. |
+ this.chime_.play(); |
+ |
chrome.hotwordPrivate.notifyHotwordRecognition('search', function() {}); |
// Implicitly clear the session. A session needs to be started in order to |