Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(721)

Side by Side Diff: chrome/browser/resources/hotword_audio_verification/flow.js

Issue 669603007: Adds the page for hotword-only to the opt-in flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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'; 10 /** @const */ var AUDIO_HISTORY_START = 'audio-history-container';
11 /** @const */ var SPEECH_TRAINING = 'speech-training-container'; 11 /** @const */ var SPEECH_TRAINING = 'speech-training-container';
12 /** @const */ var FINISHED = 'finished-container'; 12 /** @const */ var FINISHED = 'finished-container';
13 13
14 /** 14 /**
15 * These flows correspond to the three LaunchModes as defined in 15 * These flows correspond to the three LaunchModes as defined in
16 * chrome/browser/search/hotword_service.h and should be kept in sync 16 * chrome/browser/search/hotword_service.h and should be kept in sync
17 * with them. 17 * with them.
18 * @const 18 * @const
19 */ 19 */
20 var FLOWS = [ 20 var FLOWS = [
21 // TODO(kcarattini): Remove the first flow, since we will not be 21 // TODO(kcarattini): Remove the first flow, since we will not be
22 // managing the Audio History Setting in Chrome anymore. 22 // managing the Audio History Setting in Chrome anymore.
23 [AUDIO_HISTORY_START], 23 [AUDIO_HISTORY_START],
24 [HOTWORD_ONLY_START, SPEECH_TRAINING, FINISHED], 24 [HOTWORD_ONLY_START, FINISHED],
25 [HOTWORD_AUDIO_HISTORY, SPEECH_TRAINING, FINISHED], 25 [HOTWORD_AUDIO_HISTORY, SPEECH_TRAINING, FINISHED],
26 [SPEECH_TRAINING, FINISHED] 26 [SPEECH_TRAINING, FINISHED]
27 ]; 27 ];
28 28
29 /** 29 /**
30 * Class to control the page flow of the always-on hotword and 30 * Class to control the page flow of the always-on hotword and
31 * Audio History opt-in process. 31 * Audio History opt-in process.
32 * @constructor 32 * @constructor
33 */ 33 */
34 function Flow() { 34 function Flow() {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 previousStep = this.currentFlow_[this.currentStepIndex_ - 1]; 78 previousStep = this.currentFlow_[this.currentStepIndex_ - 1];
79 79
80 if (previousStep) 80 if (previousStep)
81 document.getElementById(previousStep).hidden = true; 81 document.getElementById(previousStep).hidden = true;
82 82
83 document.getElementById(currentStep).hidden = false; 83 document.getElementById(currentStep).hidden = false;
84 }; 84 };
85 85
86 window.Flow = Flow; 86 window.Flow = Flow;
87 })(); 87 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698