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

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

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: Created 3 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 Password changed screen implementation. 6 * @fileoverview Password changed screen implementation.
7 */ 7 */
8 8
9 login.createScreen('PasswordChangedScreen', 'password-changed', function() { 9 login.createScreen('PasswordChangedScreen', 'password-changed', function() {
10 return { 10 return {
11 EXTERNAL_API: [ 11 EXTERNAL_API: ['show'],
12 'show'
13 ],
14 12
15 gaiaPasswordChanged_: null, 13 gaiaPasswordChanged_: null,
16 14
17 /** @override */ 15 /** @override */
18 decorate: function() { 16 decorate: function() {
19 this.gaiaPasswordChanged_ = $('gaia-password-changed'); 17 this.gaiaPasswordChanged_ = $('gaia-password-changed');
20 this.gaiaPasswordChanged_.addEventListener('cancel', 18 this.gaiaPasswordChanged_.addEventListener(
21 this.cancel.bind(this)); 19 'cancel', this.cancel.bind(this));
22 20
23 this.gaiaPasswordChanged_.addEventListener('passwordEnter', function(e) { 21 this.gaiaPasswordChanged_.addEventListener('passwordEnter', function(e) {
24 $('login-header-bar').disabled = true; 22 $('login-header-bar').disabled = true;
25 chrome.send('migrateUserData', [e.detail.password]); 23 chrome.send('migrateUserData', [e.detail.password]);
26 }); 24 });
27 25
28 this.gaiaPasswordChanged_.addEventListener('proceedAnyway', function() { 26 this.gaiaPasswordChanged_.addEventListener('proceedAnyway', function() {
29 $('login-header-bar').disabled = true; 27 $('login-header-bar').disabled = true;
30 chrome.send('resyncUserData'); 28 chrome.send('resyncUserData');
31 }); 29 });
32 }, 30 },
33 31
34 /** 32 /**
35 * Cancels password migration and drops the user back to the login screen. 33 * Cancels password migration and drops the user back to the login screen.
36 */ 34 */
37 cancel: function() { 35 cancel: function() {
38 if (!this.gaiaPasswordChanged_.disabled) { 36 if (!this.gaiaPasswordChanged_.disabled) {
39 chrome.send('cancelPasswordChangedFlow', 37 chrome.send(
40 [this.gaiaPasswordChanged_.email]); 38 'cancelPasswordChangedFlow', [this.gaiaPasswordChanged_.email]);
41 } 39 }
42 }, 40 },
43 41
44 onAfterShow: function(data) { 42 onAfterShow: function(data) {
45 this.gaiaPasswordChanged_.focus(); 43 this.gaiaPasswordChanged_.focus();
46 }, 44 },
47 45
48 /** 46 /**
49 * Event handler that is invoked just before the screen is hidden. 47 * Event handler that is invoked just before the screen is hidden.
50 */ 48 */
(...skipping 14 matching lines...) Expand all
65 63
66 // We'll get here after the successful online authentication. 64 // We'll get here after the successful online authentication.
67 // It assumes session is about to start so hides login screen controls. 65 // It assumes session is about to start so hides login screen controls.
68 Oobe.getInstance().headerHidden = false; 66 Oobe.getInstance().headerHidden = false;
69 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED}); 67 Oobe.showScreen({id: SCREEN_PASSWORD_CHANGED});
70 $('login-header-bar').disabled = false; 68 $('login-header-bar').disabled = false;
71 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.PASSWORD_CHANGED; 69 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.PASSWORD_CHANGED;
72 } 70 }
73 }; 71 };
74 }); 72 });
75
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698