| OLD | NEW |
| 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 (function() { | 9 (function() { |
| 10 /** | 10 /** |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 'profile-icons-received', this.handleProfileIcons_.bind(this)); | 130 'profile-icons-received', this.handleProfileIcons_.bind(this)); |
| 131 this.addWebUIListener( | 131 this.addWebUIListener( |
| 132 'profile-defaults-received', this.handleProfileDefaults_.bind(this)); | 132 'profile-defaults-received', this.handleProfileDefaults_.bind(this)); |
| 133 this.addWebUIListener( | 133 this.addWebUIListener( |
| 134 'signedin-users-received', this.handleSignedInUsers_.bind(this)); | 134 'signedin-users-received', this.handleSignedInUsers_.bind(this)); |
| 135 | 135 |
| 136 this.browserProxy_.getAvailableIcons(); | 136 this.browserProxy_.getAvailableIcons(); |
| 137 this.browserProxy_.getSignedInUsers(); | 137 this.browserProxy_.getSignedInUsers(); |
| 138 }, | 138 }, |
| 139 | 139 |
| 140 /** @override */ |
| 141 attached: function() { |
| 142 this.$.nameInput.focus(); |
| 143 }, |
| 144 |
| 140 /** | 145 /** |
| 141 * Handles tap events from: | 146 * Handles tap events from: |
| 142 * - links within dynamic warning/error messages pushed from the browser. | 147 * - links within dynamic warning/error messages pushed from the browser. |
| 143 * - the 'noSignedInUserMessage' i18n string. | 148 * - the 'noSignedInUserMessage' i18n string. |
| 144 * @param {!Event} event | 149 * @param {!Event} event |
| 145 * @private | 150 * @private |
| 146 */ | 151 */ |
| 147 onTap_: function(event) { | 152 onTap_: function(event) { |
| 148 var element = Polymer.dom(event).rootTarget; | 153 var element = Polymer.dom(event).rootTarget; |
| 149 | 154 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 * Computed binding that returns True if there are any signed-in users. | 464 * Computed binding that returns True if there are any signed-in users. |
| 460 * @param {!Array<!SignedInUser>} signedInUsers signed-in users. | 465 * @param {!Array<!SignedInUser>} signedInUsers signed-in users. |
| 461 * @return {boolean} | 466 * @return {boolean} |
| 462 * @private | 467 * @private |
| 463 */ | 468 */ |
| 464 isSignedIn_: function(signedInUsers) { | 469 isSignedIn_: function(signedInUsers) { |
| 465 return signedInUsers.length > 0; | 470 return signedInUsers.length > 0; |
| 466 } | 471 } |
| 467 }); | 472 }); |
| 468 }()); | 473 }()); |
| OLD | NEW |