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

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

Issue 2938933002: WebUI: swap paper-dropdown-menu out for md-select. (Closed)
Patch Set: fix test 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 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 9
10 /** @typedef {{url: string, label:string}} */ 10 /** @typedef {{url: string, label:string}} */
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 this.hideMessage_(); 364 this.hideMessage_();
365 this.createInProgress_ = true; 365 this.createInProgress_ = true;
366 var createShortcut = 366 var createShortcut =
367 this.isProfileShortcutsEnabled_ && this.createShortcut_; 367 this.isProfileShortcutsEnabled_ && this.createShortcut_;
368 this.browserProxy_.createProfile( 368 this.browserProxy_.createProfile(
369 this.profileName_, this.profileIconUrl_, createShortcut, 369 this.profileName_, this.profileIconUrl_, createShortcut,
370 this.isSupervised_, '', custodianProfilePath); 370 this.isSupervised_, '', custodianProfilePath);
371 }, 371 },
372 372
373 /** 373 /**
374 * Handler for a change in the supervised account dropdown.
375 * @param {!{target: HTMLSelectElement}} event
376 * @private
377 */
378 onAccountChanged_: function(event) {
379 this.signedInUserIndex_ = parseInt(event.target.value, 10);
380 },
381
382 /**
374 * Handler for the 'import' event fired by #importUserPopup once a supervised 383 * Handler for the 'import' event fired by #importUserPopup once a supervised
375 * user is selected to be imported and the popup closes. 384 * user is selected to be imported and the popup closes.
376 * @param {!{detail: {supervisedUser: !SupervisedUser, 385 * @param {!{detail: {supervisedUser: !SupervisedUser,
377 * signedInUser: !SignedInUser}}} event 386 * signedInUser: !SignedInUser}}} event
378 * @private 387 * @private
379 */ 388 */
380 onImportUserPopupImport_: function(event) { 389 onImportUserPopupImport_: function(event) {
381 var supervisedUser = event.detail.supervisedUser; 390 var supervisedUser = event.detail.supervisedUser;
382 var signedInUser = event.detail.signedInUser; 391 var signedInUser = event.detail.signedInUser;
383 this.hideMessage_(); 392 this.hideMessage_();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 * Computed binding that returns True if there are any signed-in users. 528 * Computed binding that returns True if there are any signed-in users.
520 * @param {!Array<!SignedInUser>} signedInUsers signed-in users. 529 * @param {!Array<!SignedInUser>} signedInUsers signed-in users.
521 * @return {boolean} 530 * @return {boolean}
522 * @private 531 * @private
523 */ 532 */
524 isSignedIn_: function(signedInUsers) { 533 isSignedIn_: function(signedInUsers) {
525 return signedInUsers.length > 0; 534 return signedInUsers.length > 0;
526 } 535 }
527 }); 536 });
528 }()); 537 }());
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698