| 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 'control-bar' is the horizontal bar at the bottom of the user | 6 * @fileoverview 'control-bar' is the horizontal bar at the bottom of the user |
| 7 * manager screen. | 7 * manager screen. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'control-bar', | 10 is: 'control-bar', |
| 11 | 11 |
| 12 behaviors: [ |
| 13 I18nBehavior, |
| 14 ], |
| 15 |
| 12 properties: { | 16 properties: { |
| 13 /** | 17 /** |
| 14 * True if 'Browse as Guest' button is displayed. | 18 * True if 'Browse as Guest' button is displayed. |
| 15 * @type {boolean} | 19 * @type {boolean} |
| 16 */ | 20 */ |
| 17 showGuest: { | 21 showGuest: { |
| 18 type: Boolean, | 22 type: Boolean, |
| 19 value: false | 23 value: false |
| 20 }, | 24 }, |
| 21 | 25 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 * @private | 47 * @private |
| 44 */ | 48 */ |
| 45 onLaunchGuestTap_: function(event) { | 49 onLaunchGuestTap_: function(event) { |
| 46 this.browserProxy_.launchGuestUser(); | 50 this.browserProxy_.launchGuestUser(); |
| 47 }, | 51 }, |
| 48 | 52 |
| 49 /** | 53 /** |
| 50 * Handler for 'Add Person' button click event. | 54 * Handler for 'Add Person' button click event. |
| 51 * @param {!Event} event | 55 * @param {!Event} event |
| 52 * @private | 56 * @private |
| 57 * @suppress {checkTypes} |
| 53 */ | 58 */ |
| 54 onAddUserTap_: function(event) { | 59 onAddUserTap_: function(event) { |
| 55 // Event is caught by user-manager-pages. | 60 if (cr.ui.UserManager.getInstance().areAllProfilesLocked) { |
| 56 this.fire('change-page', {page: 'create-user-page'}); | 61 cr.ui.UserManager.showErrorDialog( |
| 62 this.i18n('AddProfileAllProfilesLockedError')); |
| 63 } else { |
| 64 // Event is caught by user-manager-pages. |
| 65 this.fire('change-page', {page: 'create-user-page'}); |
| 66 } |
| 57 } | 67 } |
| 58 }); | 68 }); |
| OLD | NEW |