| Index: components/proximity_auth/webui/resources/device-list.js
|
| diff --git a/components/proximity_auth/webui/resources/device-list.js b/components/proximity_auth/webui/resources/device-list.js
|
| index 60fbdecc2dc217c3ff98e1ef118f86ebc6fb16ff..74ce87f1127ed4fe914102eeb3aae6f041fe1dfb 100644
|
| --- a/components/proximity_auth/webui/resources/device-list.js
|
| +++ b/components/proximity_auth/webui/resources/device-list.js
|
| @@ -23,6 +23,15 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * Handles when the toggle connection button is clicked for a list item.
|
| + * @param {Event} event
|
| + */
|
| + toggleConnection_: function(event) {
|
| + var deviceInfo = event.model.item;
|
| + chrome.send('toggleConnection', [deviceInfo.publicKey]);
|
| + },
|
| +
|
| + /**
|
| * @param {string} reason The device ineligibility reason.
|
| * @return {string} The prettified ineligibility reason.
|
| * @private
|
| @@ -92,5 +101,44 @@ Polymer({
|
| default:
|
| return 'error';
|
| };
|
| - }
|
| + },
|
| +
|
| + /**
|
| + * @param {number} userPresence
|
| + * @return {string}
|
| + */
|
| + getUserPresenceText_: function(userPresence) {
|
| + var userPresenceMap = {
|
| + 0: 'User Present',
|
| + 1: 'User Absent',
|
| + 2: 'User Presence Unknown',
|
| + };
|
| + return userPresenceMap[userPresence];
|
| + },
|
| +
|
| + /**
|
| + * @param {number} screenLock
|
| + * @return {string}
|
| + */
|
| + getScreenLockText_: function(screenLock) {
|
| + var screenLockMap = {
|
| + 0: 'Secure Screen Lock Enabled',
|
| + 1: 'Secure Screen Lock Disabled',
|
| + 2: 'Secure Screen Lock State Unknown',
|
| + };
|
| + return screenLockMap[screenLock];
|
| + },
|
| +
|
| + /**
|
| + * @param {number} trustAgent
|
| + * @return {string}
|
| + */
|
| + getTrustAgentText_: function(trustAgent) {
|
| + var trustAgentMap = {
|
| + 0: 'Trust Agent Enabled',
|
| + 1: 'Trust Agent Disabled',
|
| + 2: 'Trust Agent Unsupported',
|
| + };
|
| + return trustAgentMap[trustAgent];
|
| + },
|
| });
|
|
|