OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 (function() { | 5 (function() { |
6 | 6 |
7 // Correspond to steps in the hotword opt-in flow. | 7 // Correspond to steps in the hotword opt-in flow. |
8 /** @const */ var HOTWORD_AUDIO_HISTORY = 'hotword-audio-history-container'; | 8 /** @const */ var HOTWORD_AUDIO_HISTORY = 'hotword-audio-history-container'; |
9 /** @const */ var HOTWORD_ONLY_START = 'hotword-only-container'; | 9 /** @const */ var HOTWORD_ONLY_START = 'hotword-only-container'; |
10 /** @const */ var AUDIO_HISTORY_START = 'audio-history-container'; | |
11 /** @const */ var SPEECH_TRAINING = 'speech-training-container'; | 10 /** @const */ var SPEECH_TRAINING = 'speech-training-container'; |
12 /** @const */ var FINISHED = 'finished-container'; | 11 /** @const */ var FINISHED = 'finished-container'; |
13 | 12 |
14 /** | 13 /** |
15 * These flows correspond to the three LaunchModes as defined in | 14 * These flows correspond to the three LaunchModes as defined in |
16 * chrome/browser/search/hotword_service.h and should be kept in sync | 15 * chrome/browser/search/hotword_service.h and should be kept in sync |
17 * with them. | 16 * with them. |
18 * @const | 17 * @const |
19 */ | 18 */ |
20 var FLOWS = [ | 19 var FLOWS = [ |
21 // TODO(kcarattini): Remove the first flow, since we will not be | |
22 // managing the Audio History Setting in Chrome anymore. | |
23 [AUDIO_HISTORY_START], | |
24 [HOTWORD_ONLY_START, FINISHED], | 20 [HOTWORD_ONLY_START, FINISHED], |
25 [HOTWORD_AUDIO_HISTORY, SPEECH_TRAINING, FINISHED], | 21 [HOTWORD_AUDIO_HISTORY, SPEECH_TRAINING, FINISHED], |
26 [SPEECH_TRAINING, FINISHED] | 22 [SPEECH_TRAINING, FINISHED] |
27 ]; | 23 ]; |
28 | 24 |
29 /** | 25 /** |
30 * Class to control the page flow of the always-on hotword and | 26 * Class to control the page flow of the always-on hotword and |
31 * Audio History opt-in process. | 27 * Audio History opt-in process. |
32 * @constructor | 28 * @constructor |
33 */ | 29 */ |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 previousStep = this.currentFlow_[this.currentStepIndex_ - 1]; | 76 previousStep = this.currentFlow_[this.currentStepIndex_ - 1]; |
81 | 77 |
82 if (previousStep) | 78 if (previousStep) |
83 document.getElementById(previousStep).hidden = true; | 79 document.getElementById(previousStep).hidden = true; |
84 | 80 |
85 chrome.app.window.current().show(); | 81 chrome.app.window.current().show(); |
86 }; | 82 }; |
87 | 83 |
88 window.Flow = Flow; | 84 window.Flow = Flow; |
89 })(); | 85 })(); |
OLD | NEW |