Index: chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js |
diff --git a/chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js b/chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cc70a5a7098bef8bdd83ce81d259d9dbcbf3130c |
--- /dev/null |
+++ b/chrome/browser/resources/chromeos/login/screen_active_directory_password_change.js |
@@ -0,0 +1,55 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * @fileoverview Active Directory password change screen implementation. |
+ */ |
+ |
michaelpg
2017/01/11 22:09:14
nit: remove blank line
Roman Sorokin (ftl)
2017/01/12 12:38:50
Done.
|
+login.createScreen('ActiveDirectoryPasswordChangeScreen', 'ad-password-change', |
+ function() { |
+ return { |
+ EXTERNAL_API: [ |
+ 'show' |
+ ], |
+ |
+ adPasswordChanged_: null, |
+ |
+ /** @override */ |
+ decorate: function() { |
+ this.adPasswordChanged_ = $('active-directory-password-change'); |
+ this.adPasswordChanged_.addEventListener('cancel', |
+ this.cancel.bind(this)); |
michaelpg
2017/01/11 22:09:13
wrong indent (align with 1st parameter)
Roman Sorokin (ftl)
2017/01/12 12:38:50
Done.
|
+ |
+ this.adPasswordChanged_.addEventListener('authCompleted', |
+ function(e) { |
+ chrome.send('completeAdPasswordChange', |
+ [e.detail.username, |
michaelpg
2017/01/11 22:09:14
4-space indent
Roman Sorokin (ftl)
2017/01/12 12:38:50
Done.
|
+ e.detail.oldPassword, |
+ e.detail.newPassword, |
+ e.detail.repeatNewPassword]); |
+ }.bind(this)); |
+ }, |
+ |
+ /** |
+ * Cancels password changing and drops the user back to the login screen. |
+ */ |
+ cancel: function() { |
+ Oobe.showUserPods(); |
+ }, |
+ |
+ /** |
+ * Show password changed screen. |
michaelpg
2017/01/11 22:09:15
nit: Shows
Roman Sorokin (ftl)
2017/01/12 12:38:50
Done.
|
+ * @param {string} username Name of user that should change the password. |
+ */ |
+ show: function(username) { |
+ // We'll get here after the successful Active Directory authentication. |
+ // It assumes session is about to start so hides login screen controls. |
+ Oobe.getInstance().headerHidden = true; |
+ Oobe.showScreen({id: SCREEN_ACTIVE_DIRECTORY_PASSWORD_CHANGE}); |
+ this.adPasswordChanged_.reset(); |
+ this.adPasswordChanged_.username = username; |
+ } |
+ }; |
+}); |
+ |
michaelpg
2017/01/11 22:09:14
nit: remove blank line
Roman Sorokin (ftl)
2017/01/12 12:38:50
Done.
|