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

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: rebase Created 4 years, 9 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 * 8 *
9 * @element create-profile 9 * @element create-profile
10 */ 10 */
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 handleUpdateSignedInUsers_: function(signedInUsers) { 164 handleUpdateSignedInUsers_: function(signedInUsers) {
165 this.signedInUsers_ = signedInUsers; 165 this.signedInUsers_ = signedInUsers;
166 this.signedIn_ = signedInUsers.length > 0; 166 this.signedIn_ = signedInUsers.length > 0;
167 }, 167 },
168 168
169 /** 169 /**
170 * Handler for the 'Learn More' button click event. 170 * Handler for the 'Learn More' button click event.
171 * @param {!Event} event 171 * @param {!Event} event
172 * @private 172 * @private
173 */ 173 */
174 onLearnMore_: function(event) { 174 onLearnMoreTap_: function(event) {
175 // TODO(mahmadi): fire the event to show the 'learn-more-page' 175 this.fire('change-page', {page: 'supervised-learn-more-page'});
176 }, 176 },
177 177
178 /** 178 /**
179 * Handler for the 'Ok' button click event. 179 * Handler for the 'Ok' button click event.
180 * @param {!Event} event 180 * @param {!Event} event
181 * @private 181 * @private
182 */ 182 */
183 onOk_: function(event) { 183 onOkTap_: function(event) {
184 this.createInProgress_ = true; 184 this.createInProgress_ = true;
185 signin.ProfileApi.createProfile( 185 signin.ProfileApi.createProfile(
186 this.profileName_, this.profileIconUrl_, this.isSupervised_, 186 this.profileName_, this.profileIconUrl_, this.isSupervised_,
187 this.signedInUsers_[this.selectedEmail_].profilePath); 187 this.signedInUsers_[this.selectedEmail_].profilePath);
188 }, 188 },
189 189
190 /** 190 /**
191 * Handler for the 'Cancel' button click event. 191 * Handler for the 'Cancel' button click event.
192 * @param {!Event} event 192 * @param {!Event} event
193 * @private 193 * @private
194 */ 194 */
195 onCancel_: function(event) { 195 onCancelTap_: function(event) {
196 if (this.createInProgress_) { 196 if (this.createInProgress_) {
197 this.createInProgress_ = false; 197 this.createInProgress_ = false;
198 signin.ProfileApi.cancelCreateProfile(); 198 signin.ProfileApi.cancelCreateProfile();
199 } else { 199 } else {
200 this.fire('change-page', {page: 'user-pods-page'}); 200 this.fire('change-page', {page: 'user-pods-page'});
201 } 201 }
202 }, 202 },
203 203
204 /** 204 /**
205 * Handler for when the user clicks a new profile icon. 205 * Handler for when the user clicks a new profile icon.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 * Computed binding determining whether supervised user checkbox is disabled. 269 * Computed binding determining whether supervised user checkbox is disabled.
270 * @param {boolean} createInProgress Is create in progress? 270 * @param {boolean} createInProgress Is create in progress?
271 * @param {boolean} signedIn Are there any signed-in users? 271 * @param {boolean} signedIn Are there any signed-in users?
272 * @return {boolean} 272 * @return {boolean}
273 * @private 273 * @private
274 */ 274 */
275 isSupervisedUserCheckboxDisabled_: function(createInProgress, signedIn) { 275 isSupervisedUserCheckboxDisabled_: function(createInProgress, signedIn) {
276 return createInProgress || !signedIn; 276 return createInProgress || !signedIn;
277 } 277 }
278 }); 278 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698