OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 Login UI based on a stripped down OOBE controller. | 6 * @fileoverview Login UI based on a stripped down OOBE controller. |
7 */ | 7 */ |
8 | 8 |
9 <include src="login_shared.js"> | 9 <include src="login_shared.js"> |
10 | 10 |
11 /** | 11 /** |
12 * Asynchronously loads the pin keyboard. | 12 * Asynchronously loads the pin keyboard. |
13 */ | 13 */ |
14 function showPinKeyboardAsync() { | 14 function showPinKeyboardAsync() { |
15 'use strict'; | 15 'use strict'; |
16 | 16 |
17 // This function could get called multiple times. Do nothing if we have | 17 // This function could get called multiple times. Do nothing if we have |
18 // already loaded. This check needs to happen before the registerAssets call, | 18 // already loaded. This check needs to happen before the registerAssets call, |
19 // because that will clobber the loaded state. | 19 // because that will clobber the loaded state. |
20 if (cr.ui.login.ResourceLoader.alreadyLoadedAssets('custom-elements')) | 20 if (cr.ui.login.ResourceLoader.hasDeferredAssets('custom-elements')) |
21 return; | 21 return; |
22 | 22 |
23 // Register loader for custom elements. | 23 // Register loader for custom elements. |
24 cr.ui.login.ResourceLoader.registerAssets({ | 24 cr.ui.login.ResourceLoader.registerAssets({ |
25 id: 'custom-elements', | 25 id: 'custom-elements', |
26 html: [{ url: 'chrome://oobe/custom_elements.html' }] | 26 html: [{ url: 'chrome://oobe/custom_elements.html' }] |
27 }); | 27 }); |
28 | 28 |
29 // Called after polymer has been loaded. Fades the pin element in. | 29 // Called after polymer has been loaded. Fades the pin element in. |
30 var onPinLoaded = function(pinKeyboard) { | 30 var onPinLoaded = function(pinKeyboard) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 * Reloads content of the page. | 81 * Reloads content of the page. |
82 * @param {!Object} data New dictionary with i18n values. | 82 * @param {!Object} data New dictionary with i18n values. |
83 */ | 83 */ |
84 reloadContent: function(data) { | 84 reloadContent: function(data) { |
85 loadTimeData.overrideValues(data); | 85 loadTimeData.overrideValues(data); |
86 i18nTemplate.process(document, loadTimeData); | 86 i18nTemplate.process(document, loadTimeData); |
87 Oobe.getInstance().updateLocalizedContent_(); | 87 Oobe.getInstance().updateLocalizedContent_(); |
88 }, | 88 }, |
89 }; | 89 }; |
90 }); | 90 }); |
OLD | NEW |