Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 User pod row implementation. | 6 * @fileoverview User pod row implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 /** | 10 /** |
| (...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1117 this.querySelector('.mp-policy-primary-only-msg').hidden = false; | 1117 this.querySelector('.mp-policy-primary-only-msg').hidden = false; |
| 1118 else if (this.user.multiProfilesPolicy == 'owner-primary-only') | 1118 else if (this.user.multiProfilesPolicy == 'owner-primary-only') |
| 1119 this.querySelector('.mp-owner-primary-only-msg').hidden = false; | 1119 this.querySelector('.mp-owner-primary-only-msg').hidden = false; |
| 1120 else | 1120 else |
| 1121 this.querySelector('.mp-policy-not-allowed-msg').hidden = false; | 1121 this.querySelector('.mp-policy-not-allowed-msg').hidden = false; |
| 1122 } else if (this.user_.isApp) { | 1122 } else if (this.user_.isApp) { |
| 1123 this.setUserPodIconType('app'); | 1123 this.setUserPodIconType('app'); |
| 1124 } | 1124 } |
| 1125 }, | 1125 }, |
| 1126 | 1126 |
| 1127 setEnableTransitions: function(enable) { | |
| 1128 this.classList.toggle('flying-pin-pod', enable); | |
|
jdufault
2016/06/29 20:40:35
Do we ever want this not enabled?
sammiequon
2016/06/29 21:01:23
It seems the user picker in chrome uses user pod t
| |
| 1129 }, | |
| 1130 | |
| 1127 setPinVisibility: function(visible) { | 1131 setPinVisibility: function(visible) { |
| 1128 var elements = [this, this.authElement, this.imageElement, | 1132 var elements = [this, this.authElement, this.imageElement, |
| 1129 this.signInElement, this.pinContainer]; | 1133 this.signInElement, this.pinContainer]; |
| 1130 | 1134 |
| 1131 for (var idx = 0; idx < elements.length; idx++) { | 1135 for (var idx = 0; idx < elements.length; idx++) { |
| 1132 var currentElement = elements[idx]; | 1136 var currentElement = elements[idx]; |
| 1133 currentElement.classList.toggle('pin-enabled', visible); | 1137 currentElement.classList.toggle('pin-enabled', visible); |
| 1134 currentElement.classList.toggle('pin-disabled', !visible); | 1138 currentElement.classList.toggle('pin-disabled', !visible); |
| 1135 } | 1139 } |
| 1136 }, | 1140 }, |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2544 /** | 2548 /** |
| 2545 * Add an existing user pod to this pod row. | 2549 * Add an existing user pod to this pod row. |
| 2546 * @param {!Object} user User info dictionary. | 2550 * @param {!Object} user User info dictionary. |
| 2547 */ | 2551 */ |
| 2548 addUserPod: function(user) { | 2552 addUserPod: function(user) { |
| 2549 var userPod = this.createUserPod(user); | 2553 var userPod = this.createUserPod(user); |
| 2550 this.appendChild(userPod); | 2554 this.appendChild(userPod); |
| 2551 userPod.initialize(); | 2555 userPod.initialize(); |
| 2552 }, | 2556 }, |
| 2553 | 2557 |
| 2558 setEnablePodTransitions: function(enable) { | |
| 2559 for (var i = 0; i < this.pods.length; ++i) | |
| 2560 this.pods[i].setEnableTransitions(enable); | |
| 2561 }, | |
| 2562 | |
| 2554 setFocusedPodPinVisibility: function(visible) { | 2563 setFocusedPodPinVisibility: function(visible) { |
| 2555 if (this.focusedPod_ && this.focusedPod_.user.showPin) | 2564 if (this.focusedPod_ && this.focusedPod_.user.showPin) |
| 2556 this.focusedPod_.setPinVisibility(visible); | 2565 this.focusedPod_.setPinVisibility(visible); |
| 2557 }, | 2566 }, |
| 2558 | 2567 |
| 2559 /** | 2568 /** |
| 2560 * Runs app with a given id from the list of loaded apps. | 2569 * Runs app with a given id from the list of loaded apps. |
| 2561 * @param {!string} app_id of an app to run. | 2570 * @param {!string} app_id of an app to run. |
| 2562 * @param {boolean=} opt_diagnosticMode Whether to run the app in | 2571 * @param {boolean=} opt_diagnosticMode Whether to run the app in |
| 2563 * diagnostic mode. Default is false. | 2572 * diagnostic mode. Default is false. |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3473 if (pod && pod.multiProfilesPolicyApplied) { | 3482 if (pod && pod.multiProfilesPolicyApplied) { |
| 3474 pod.userTypeBubbleElement.classList.remove('bubble-shown'); | 3483 pod.userTypeBubbleElement.classList.remove('bubble-shown'); |
| 3475 } | 3484 } |
| 3476 } | 3485 } |
| 3477 }; | 3486 }; |
| 3478 | 3487 |
| 3479 return { | 3488 return { |
| 3480 PodRow: PodRow | 3489 PodRow: PodRow |
| 3481 }; | 3490 }; |
| 3482 }); | 3491 }); |
| OLD | NEW |