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'; | 10 /** @const */ var AUDIO_HISTORY_START = 'audio-history-container'; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 this.advanceStep(); | 66 this.advanceStep(); |
67 }; | 67 }; |
68 | 68 |
69 /** | 69 /** |
70 * Displays the current step. If the current step is not the first step, | 70 * Displays the current step. If the current step is not the first step, |
71 * also hides the previous step. | 71 * also hides the previous step. |
72 * @private | 72 * @private |
73 */ | 73 */ |
74 Flow.prototype.showStep_ = function() { | 74 Flow.prototype.showStep_ = function() { |
75 var currentStep = this.currentFlow_[this.currentStepIndex_]; | 75 var currentStep = this.currentFlow_[this.currentStepIndex_]; |
| 76 document.getElementById(currentStep).hidden = false; |
| 77 |
76 var previousStep = null; | 78 var previousStep = null; |
77 if (this.currentStepIndex_ > 0) | 79 if (this.currentStepIndex_ > 0) |
78 previousStep = this.currentFlow_[this.currentStepIndex_ - 1]; | 80 previousStep = this.currentFlow_[this.currentStepIndex_ - 1]; |
79 | 81 |
80 if (previousStep) | 82 if (previousStep) |
81 document.getElementById(previousStep).hidden = true; | 83 document.getElementById(previousStep).hidden = true; |
82 | 84 |
83 document.getElementById(currentStep).hidden = false; | 85 chrome.app.window.current().show(); |
84 }; | 86 }; |
85 | 87 |
86 window.Flow = Flow; | 88 window.Flow = Flow; |
87 })(); | 89 })(); |
OLD | NEW |