Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: chrome/browser/resources/chromeos/login/lock.js

Issue 2027683003: Pin keyboard moved to under the user profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Added a comment. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/screen_container.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Asynchronously loads the pin keyboard. 11 /**
12 * Asynchronously loads the pin keyboard.
13 */
12 function showPinKeyboardAsync() { 14 function showPinKeyboardAsync() {
13 'use strict'; 15 'use strict';
14 16
15 // 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
16 // already loaded. This check needs to happen before the registerAssets call, 18 // already loaded. This check needs to happen before the registerAssets call,
17 // because that will clobber the loaded state. 19 // because that will clobber the loaded state.
18 if (cr.ui.login.ResourceLoader.alreadyLoadedAssets('custom-elements')) 20 if (cr.ui.login.ResourceLoader.alreadyLoadedAssets('custom-elements'))
19 return; 21 return;
20 22
21 // Register loader for custom elements. 23 // Register loader for custom elements.
22 cr.ui.login.ResourceLoader.registerAssets({ 24 cr.ui.login.ResourceLoader.registerAssets({
23 id: 'custom-elements', 25 id: 'custom-elements',
24 html: [{ url: 'chrome://oobe/custom_elements.html' }] 26 html: [{ url: 'chrome://oobe/custom_elements.html' }]
25 }); 27 });
26 28
27 // Called after polymer has been loaded. Fades the pin element in. 29 // Called after polymer has been loaded. Fades the pin element in.
28 var onPinLoaded = function(pinContainer) { 30 var onPinLoaded = function(pinKeyboard) {
29 pinContainer.style.opacity = 1; 31 var podRow = $('pod-row');
32 podRow.setFocusedPodPinVisibility(true);
33 };
34
35 // The element we want to see if loaded.
36 var getPinKeyboard = function() {
37 return $('pod-row').querySelectorAll('pin-keyboard')[0];
30 }; 38 };
31 39
32 // We only load the PIN element when it is actually shown so that lock screen 40 // We only load the PIN element when it is actually shown so that lock screen
33 // load times remain low when the user is not using a PIN. 41 // load times remain low when the user is not using a PIN.
34 // 42 //
35 // Loading the PIN element blocks the DOM, which will interrupt any running 43 // Loading the PIN element blocks the DOM, which will interrupt any running
36 // animations. We load the PIN after an idle notification to allow the pod 44 // animations. We load the PIN after an idle notification to allow the pod
37 // fly-in animation to complete without interruption. 45 // fly-in animation to complete without interruption.
38 cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements', function() { 46 cr.ui.login.ResourceLoader.loadAssetsOnIdle('custom-elements', function() {
39 cr.ui.login.ResourceLoader.waitUntilLayoutComplete('pin-container', 47 cr.ui.login.ResourceLoader.waitUntilLayoutComplete(getPinKeyboard,
40 onPinLoaded); 48 onPinLoaded);
41 }); 49 });
42 } 50 }
43 51
44 cr.define('cr.ui.Oobe', function() { 52 cr.define('cr.ui.Oobe', function() {
45 return { 53 return {
46 /** 54 /**
47 * Initializes the OOBE flow. This will cause all C++ handlers to 55 * Initializes the OOBE flow. This will cause all C++ handlers to
48 * be invoked to do final setup. 56 * be invoked to do final setup.
49 */ 57 */
(...skipping 22 matching lines...) Expand all
72 * Reloads content of the page. 80 * Reloads content of the page.
73 * @param {!Object} data New dictionary with i18n values. 81 * @param {!Object} data New dictionary with i18n values.
74 */ 82 */
75 reloadContent: function(data) { 83 reloadContent: function(data) {
76 loadTimeData.overrideValues(data); 84 loadTimeData.overrideValues(data);
77 i18nTemplate.process(document, loadTimeData); 85 i18nTemplate.process(document, loadTimeData);
78 Oobe.getInstance().updateLocalizedContent_(); 86 Oobe.getInstance().updateLocalizedContent_();
79 }, 87 },
80 }; 88 };
81 }); 89 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/login/screen_container.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698