| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 Account picker screen implementation. | 6 * @fileoverview Account picker screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 /** | 10 /** |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 firstShown_ : true, | 35 firstShown_ : true, |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Event handler that is invoked just before the frame is shown. | 38 * Event handler that is invoked just before the frame is shown. |
| 39 * @param data {string} Screen init payload. | 39 * @param data {string} Screen init payload. |
| 40 */ | 40 */ |
| 41 onBeforeShow: function(data) { | 41 onBeforeShow: function(data) { |
| 42 $('pod-row').handleShow(); | 42 $('pod-row').handleShow(); |
| 43 if (this.firstShown_) { | 43 if (this.firstShown_) { |
| 44 this.firstShown_ = false; | 44 this.firstShown_ = false; |
| 45 $('pod-row').startInitAnimation(); | 45 // TODO(nkostylev): Enable animation back when session start jank |
| 46 // is reduced. See http://crosbug.com/11116 http://crosbug.com/18307 |
| 47 // $('pod-row').startInitAnimation(); |
| 48 |
| 49 // TODO(altimofeev): Call it after animation has stoped when animation |
| 50 // is enabled. |
| 51 chrome.send('accountPickerReady', []); |
| 46 } | 52 } |
| 47 }, | 53 }, |
| 48 | 54 |
| 49 /** | 55 /** |
| 50 * Event handler that is invoked just before the frame is hidden. | 56 * Event handler that is invoked just before the frame is hidden. |
| 51 * @param data {string} Screen init payload. | 57 * @param data {string} Screen init payload. |
| 52 */ | 58 */ |
| 53 onBeforeHide: function(data) { | 59 onBeforeHide: function(data) { |
| 54 $('pod-row').handleHide(); | 60 $('pod-row').handleHide(); |
| 55 } | 61 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 71 * @public | 77 * @public |
| 72 */ | 78 */ |
| 73 AccountPickerScreen.setCapsLockState = function(enabled) { | 79 AccountPickerScreen.setCapsLockState = function(enabled) { |
| 74 $('pod-row').classList[enabled ? 'add' : 'remove']('capslock-on'); | 80 $('pod-row').classList[enabled ? 'add' : 'remove']('capslock-on'); |
| 75 }; | 81 }; |
| 76 | 82 |
| 77 return { | 83 return { |
| 78 AccountPickerScreen: AccountPickerScreen | 84 AccountPickerScreen: AccountPickerScreen |
| 79 }; | 85 }; |
| 80 }); | 86 }); |
| OLD | NEW |