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

Side by Side Diff: chrome/browser/resources/md_user_manager/create_profile.js

Issue 1725563003: MD user manager (learn more page, user manager tutorial) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed what was breaking browser test accross all platforms Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 'create-profile' is a page that contains controls for creating 6 * @fileoverview 'create-profile' is a page that contains controls for creating
7 * a (optionally supervised) profile, including choosing a name, and an avatar. 7 * a (optionally supervised) profile, including choosing a name, and an avatar.
8 *
9 * @element create-profile
10 */ 8 */
11 Polymer({ 9 Polymer({
12 is: 'create-profile', 10 is: 'create-profile',
13 11
14 behaviors: [WebUIListenerBehavior], 12 behaviors: [
13 I18nBehavior,
14 WebUIListenerBehavior
15 ],
15 16
16 properties: { 17 properties: {
17 /** 18 /**
18 * True if supervised user checkbox is disabled. 19 * True if supervised user checkbox is disabled.
19 * @private {boolean} 20 * @private {boolean}
20 */ 21 */
21 supervisedUserCheckboxDisabled_: { 22 supervisedUserCheckboxDisabled_: {
22 type: Boolean, 23 type: Boolean,
23 computed: 24 computed:
24 'isSupervisedUserCheckboxDisabled_(createInProgress_, signedIn_)' 25 'isSupervisedUserCheckboxDisabled_(createInProgress_, signedIn_)'
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 this.signedInUsers_ = signedInUsers; 159 this.signedInUsers_ = signedInUsers;
159 this.signedIn_ = signedInUsers.length > 0; 160 this.signedIn_ = signedInUsers.length > 0;
160 }, 161 },
161 162
162 /** 163 /**
163 * Handler for the 'Learn More' button click event. 164 * Handler for the 'Learn More' button click event.
164 * @param {!Event} event 165 * @param {!Event} event
165 * @private 166 * @private
166 */ 167 */
167 onLearnMoreTap_: function(event) { 168 onLearnMoreTap_: function(event) {
168 // TODO(mahmadi): fire the event to show the 'learn-more-page' 169 this.fire('change-page', {page: 'supervised-learn-more-page'});
169 }, 170 },
170 171
171 /** 172 /**
172 * Handler for the 'Ok' button click event. 173 * Handler for the 'Ok' button click event.
173 * @param {!Event} event 174 * @param {!Event} event
174 * @private 175 * @private
175 */ 176 */
176 onSaveTap_: function(event) { 177 onSaveTap_: function(event) {
177 this.createInProgress_ = true; 178 this.createInProgress_ = true;
178 this.browserProxy_.createProfile( 179 this.browserProxy_.createProfile(
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 * Computed binding determining whether supervised user checkbox is disabled. 265 * Computed binding determining whether supervised user checkbox is disabled.
265 * @param {boolean} createInProgress Is create in progress? 266 * @param {boolean} createInProgress Is create in progress?
266 * @param {boolean} signedIn Are there any signed-in users? 267 * @param {boolean} signedIn Are there any signed-in users?
267 * @return {boolean} 268 * @return {boolean}
268 * @private 269 * @private
269 */ 270 */
270 isSupervisedUserCheckboxDisabled_: function(createInProgress, signedIn) { 271 isSupervisedUserCheckboxDisabled_: function(createInProgress, signedIn) {
271 return createInProgress || !signedIn; 272 return createInProgress || !signedIn;
272 } 273 }
273 }); 274 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698