Chromium Code Reviews| Index: chrome/browser/resources/hotword_audio_verification/main.js |
| diff --git a/chrome/browser/resources/hotword_audio_verification/main.js b/chrome/browser/resources/hotword_audio_verification/main.js |
| index 46f870947c87c9928049df0c2ceb89e9712b7e08..bc72ace17fe0e095a2cd2f6b421f88152279f940 100644 |
| --- a/chrome/browser/resources/hotword_audio_verification/main.js |
| +++ b/chrome/browser/resources/hotword_audio_verification/main.js |
| @@ -23,6 +23,16 @@ document.addEventListener('DOMContentLoaded', function() { |
| e.stopPropagation(); |
| }); |
| + $('done-button').addEventListener('click', function(e) { |
| + appWindow.close(); |
| + e.stopPropagation(); |
|
Dan Beam
2014/10/21 18:17:38
why are you stopping propagation? probably mean p
kcarattini
2014/10/22 03:47:27
Done.
|
| + }); |
| + |
| + $('ho-cancel-button').addEventListener('click', function(e) { |
| + appWindow.close(); |
| + e.stopPropagation(); |
| + }); |
| + |
| $('hw-cancel-button').addEventListener('click', function(e) { |
| appWindow.close(); |
| e.stopPropagation(); |
| @@ -46,7 +56,7 @@ document.addEventListener('DOMContentLoaded', function() { |
| // TODO(kcarattini): Remove this once speech training is implemented. The |
| // way to get to the next page will be to complete the speech training. |
| - $('training').addEventListener('click', function(e) { |
| + $('st-training').addEventListener('click', function(e) { |
| if (chrome.hotwordPrivate.setAudioLoggingEnabled) |
| chrome.hotwordPrivate.setAudioLoggingEnabled(true, function() {}); |
| @@ -57,9 +67,16 @@ document.addEventListener('DOMContentLoaded', function() { |
| e.stopPropagation(); |
| }); |
| - $('try-now-button').addEventListener('click', function(e) { |
| - // TODO(kcarattini): Figure out what happens when you click this button. |
| - appWindow.close(); |
| + // TODO(kcarattini): Remove this once speech training is implemented. The |
| + // way to get to the next page will be to complete the speech training. |
| + $('ho-training').addEventListener('click', function(e) { |
| + if (chrome.hotwordPrivate.setAudioLoggingEnabled) |
| + chrome.hotwordPrivate.setAudioLoggingEnabled(true, function() {}); |
| + |
| + if (chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled) { |
| + chrome.hotwordPrivate.setHotwordAlwaysOnSearchEnabled(true, |
| + flow.advanceStep.bind(flow)); |
| + } |
| e.stopPropagation(); |
| }); |
| }); |