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

Side by Side Diff: chrome/browser/resources/chromeos/login/oobe_screen_enable_debugging.js

Issue 821473002: cros: Update enable-dev UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 /** 5 /**
6 * @fileoverview Enable developer features screen implementation. 6 * @fileoverview Enable developer features screen implementation.
7 */ 7 */
8 8
9 login.createScreen('EnableDebuggingScreen', 'debugging', function() { 9 login.createScreen('EnableDebuggingScreen', 'debugging', function() {
10 return { 10 return {
(...skipping 14 matching lines...) Expand all
25 25
26 /** @override */ 26 /** @override */
27 decorate: function() { 27 decorate: function() {
28 $('enable-debugging-help-link').addEventListener('click', 28 $('enable-debugging-help-link').addEventListener('click',
29 function(event) { 29 function(event) {
30 chrome.send('enableDebuggingOnLearnMore'); 30 chrome.send('enableDebuggingOnLearnMore');
31 }); 31 });
32 32
33 var password = $('enable-debugging-password'); 33 var password = $('enable-debugging-password');
34 var password2 = $('enable-debugging-password2'); 34 var password2 = $('enable-debugging-password2');
35 $('enable-debugging-password').addEventListener( 35 password.addEventListener('input', this.onPasswordChanged_.bind(this));
36 'input', this.onPasswordChanged_.bind(this)); 36 password2.addEventListener('input', this.onPasswordChanged_.bind(this));
37 $('enable-debugging-password2').addEventListener(
38 'input', this.onPasswordChanged_.bind(this));
39 password.placeholder = 37 password.placeholder =
40 loadTimeData.getString('enableDebuggingPasswordLabel'); 38 loadTimeData.getString('enableDebuggingPasswordLabel');
41 password2.placeholder = 39 password2.placeholder =
42 loadTimeData.getString('enableDebuggingConfirmPasswordLabel'); 40 loadTimeData.getString('enableDebuggingConfirmPasswordLabel');
43 }, 41 },
44 42
45 /** 43 /**
46 * Header text of the screen. 44 * Header text of the screen.
47 * @type {string} 45 * @type {string}
48 */ 46 */
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 * @private 153 * @private
156 */ 154 */
157 setDialogView_: function(state) { 155 setDialogView_: function(state) {
158 this.state_ = state; 156 this.state_ = state;
159 this.classList.toggle('remove-protection-view', 157 this.classList.toggle('remove-protection-view',
160 state == this.UI_STATE.REMOVE_PROTECTION); 158 state == this.UI_STATE.REMOVE_PROTECTION);
161 this.classList.toggle('setup-view', state == this.UI_STATE.SETUP); 159 this.classList.toggle('setup-view', state == this.UI_STATE.SETUP);
162 this.classList.toggle('wait-view', state == this.UI_STATE.WAIT); 160 this.classList.toggle('wait-view', state == this.UI_STATE.WAIT);
163 this.classList.toggle('done-view', state == this.UI_STATE.DONE); 161 this.classList.toggle('done-view', state == this.UI_STATE.DONE);
164 this.classList.toggle('error-view', state == this.UI_STATE.ERROR); 162 this.classList.toggle('error-view', state == this.UI_STATE.ERROR);
163 this.defaultControl.focus();
164
165 if (Oobe.getInstance().currentScreen === this)
166 Oobe.getInstance().updateScreenSize(this);
165 }, 167 },
166 168
167 updateState: function(state) { 169 updateState: function(state) {
168 this.setDialogView_(state); 170 this.setDialogView_(state);
169 } 171 }
170 }; 172 };
171 }); 173 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698