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

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

Issue 671333002: Hotword Audio Verification App: Fix window handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/hotword_audio_verification/event_page.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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';
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/hotword_audio_verification/event_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698