OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 Common OOBE controller methods. | 6 * @fileoverview Common OOBE controller methods. |
7 */ | 7 */ |
8 | 8 |
9 <include src="../../login/screen.js"></include> | 9 <include src="../../login/screen.js"></include> |
10 <include src="../user_images_grid.js"></include> | 10 <include src="../user_images_grid.js"></include> |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 }; | 190 }; |
191 | 191 |
192 /** | 192 /** |
193 * Displays animations that have to happen once login UI is fully displayed. | 193 * Displays animations that have to happen once login UI is fully displayed. |
194 */ | 194 */ |
195 Oobe.animateOnceFullyDisplayed = function() { | 195 Oobe.animateOnceFullyDisplayed = function() { |
196 login.HeaderBar.animateIn(); | 196 login.HeaderBar.animateIn(); |
197 }; | 197 }; |
198 | 198 |
199 /** | 199 /** |
| 200 * Handles login success notification. |
| 201 */ |
| 202 Oobe.onLoginSuccess = function(username) { |
| 203 if (Oobe.getInstance().currentScreen.id == SCREEN_ACCOUNT_PICKER) { |
| 204 // TODO(nkostylev): Enable animation back when session start jank |
| 205 // is reduced. See http://crosbug.com/11116 http://crosbug.com/18307 |
| 206 // $('pod-row').startAuthenticatedAnimation(); |
| 207 } |
| 208 }; |
| 209 |
| 210 /** |
200 * Sets text content for a div with |labelId|. | 211 * Sets text content for a div with |labelId|. |
201 * @param {string} labelId Id of the label div. | 212 * @param {string} labelId Id of the label div. |
202 * @param {string} labelText Text for the label. | 213 * @param {string} labelText Text for the label. |
203 */ | 214 */ |
204 Oobe.setLabelText = function(labelId, labelText) { | 215 Oobe.setLabelText = function(labelId, labelText) { |
205 DisplayManager.setLabelText(labelId, labelText); | 216 DisplayManager.setLabelText(labelId, labelText); |
206 }; | 217 }; |
207 | 218 |
208 /** | 219 /** |
209 * Sets the text content of the enterprise info message. | 220 * Sets the text content of the enterprise info message. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { | 354 cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { |
344 // This screen is async-loaded so we manually trigger i18n processing. | 355 // This screen is async-loaded so we manually trigger i18n processing. |
345 i18nTemplate.process($('oauth-enrollment'), loadTimeData); | 356 i18nTemplate.process($('oauth-enrollment'), loadTimeData); |
346 // Delayed binding since this isn't defined yet. | 357 // Delayed binding since this isn't defined yet. |
347 login.OAuthEnrollmentScreen.register(); | 358 login.OAuthEnrollmentScreen.register(); |
348 }); | 359 }); |
349 | 360 |
350 // Delayed binding since this isn't defined yet. | 361 // Delayed binding since this isn't defined yet. |
351 cr.ui.Oobe.initialize(); | 362 cr.ui.Oobe.initialize(); |
352 }); | 363 }); |
OLD | NEW |