| 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 | 
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 67     }, | 67     }, | 
| 68 | 68 | 
| 69     /** | 69     /** | 
| 70      * Notification from the host that the PIN keyboard will be used in the | 70      * Notification from the host that the PIN keyboard will be used in the | 
| 71      * lock session so it should also get preloaded. | 71      * lock session so it should also get preloaded. | 
| 72      */ | 72      */ | 
| 73     preloadPinKeyboard: function() { | 73     preloadPinKeyboard: function() { | 
| 74       showPinKeyboardAsync(); | 74       showPinKeyboardAsync(); | 
| 75     }, | 75     }, | 
| 76 | 76 | 
| 77     /** |  | 
| 78      * Called when a preloaded webview (this) instance is being reused to |  | 
| 79      * display a new lock screen session. This will also be called when a |  | 
| 80      * lock screen has been preloaded and is being displayed for the first |  | 
| 81      * time. |  | 
| 82      */ |  | 
| 83     reload: function() { |  | 
| 84       // Sending accountPickerReady displays the webui. Wait for the next |  | 
| 85       // animation frame so the user does not see any state from the previous |  | 
| 86       // instance. |  | 
| 87       requestAnimationFrame(function() { |  | 
| 88         chrome.send('accountPickerReady'); |  | 
| 89       }); |  | 
| 90     }, |  | 
| 91 |  | 
| 92     /** |  | 
| 93      * Called when the lock screen has been dismissed but this webview will stay |  | 
| 94      * in memory. The webview will be reused when Oobe.reload() is called. |  | 
| 95      */ |  | 
| 96     teardown: function() { |  | 
| 97       // The PIN keyboard will disable the virtual keyboard. Make sure to |  | 
| 98       // revert the force disable when hiding the lock screen. |  | 
| 99       chrome.send('setForceDisableVirtualKeyboard', [false]); |  | 
| 100     }, |  | 
| 101 |  | 
| 102     // Dummy Oobe functions not present with stripped login UI. | 77     // Dummy Oobe functions not present with stripped login UI. | 
| 103     initializeA11yMenu: function(e) {}, | 78     initializeA11yMenu: function(e) {}, | 
| 104     handleAccessibilityLinkClick: function(e) {}, | 79     handleAccessibilityLinkClick: function(e) {}, | 
| 105     handleSpokenFeedbackClick: function(e) {}, | 80     handleSpokenFeedbackClick: function(e) {}, | 
| 106     handleHighContrastClick: function(e) {}, | 81     handleHighContrastClick: function(e) {}, | 
| 107     handleScreenMagnifierClick: function(e) {}, | 82     handleScreenMagnifierClick: function(e) {}, | 
| 108     setUsageStats: function(checked) {}, | 83     setUsageStats: function(checked) {}, | 
| 109     setOemEulaUrl: function(oemEulaUrl) {}, | 84     setOemEulaUrl: function(oemEulaUrl) {}, | 
| 110     setTpmPassword: function(password) {}, | 85     setTpmPassword: function(password) {}, | 
| 111     refreshA11yInfo: function(data) {}, | 86     refreshA11yInfo: function(data) {}, | 
| 112 | 87 | 
| 113     /** | 88     /** | 
| 114      * Reloads content of the page. | 89      * Reloads content of the page. | 
| 115      * @param {!Object} data New dictionary with i18n values. | 90      * @param {!Object} data New dictionary with i18n values. | 
| 116      */ | 91      */ | 
| 117     reloadContent: function(data) { | 92     reloadContent: function(data) { | 
| 118       loadTimeData.overrideValues(data); | 93       loadTimeData.overrideValues(data); | 
| 119       i18nTemplate.process(document, loadTimeData); | 94       i18nTemplate.process(document, loadTimeData); | 
| 120       Oobe.getInstance().updateLocalizedContent_(); | 95       Oobe.getInstance().updateLocalizedContent_(); | 
| 121     }, | 96     }, | 
| 122   }; | 97   }; | 
| 123 }); | 98 }); | 
| OLD | NEW | 
|---|