Chromium Code Reviews| Index: chrome/browser/resources/hotword/manager.js |
| diff --git a/chrome/browser/resources/hotword/manager.js b/chrome/browser/resources/hotword/manager.js |
| index d186a3f424b2ef9d7dc615277487fce700c69553..bfcabd89eae86d7edf8bf0ce623bb8bc7a6737d5 100644 |
| --- a/chrome/browser/resources/hotword/manager.js |
| +++ b/chrome/browser/resources/hotword/manager.js |
| @@ -44,6 +44,16 @@ |
| hotword.TrainingManager.handleSpeakerModelExists(); |
| }); |
| + // Detect the microphone state has changed. |
| + chrome.hotwordPrivate.onMicrophoneStateChanged.addListener(function(enabled) { |
|
kcarattini
2015/03/31 23:31:46
How about making the PageAudioManager listen for t
calamity
2015/04/01 02:36:10
Good point. It also means I'm not calling private
|
| + if (enabled) { |
| + pageAudioManager.updateTabState_(); |
| + return; |
| + } |
| + |
| + pageAudioManager.stopHotwording_(); |
| + }); |
| + |
| // Detect when the shared module containing the NaCL module and language model |
| // is installed. |
| chrome.management.onInstalled.addListener(function(info) { |