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

Unified Diff: components/proximity_auth/webui/resources/device-list.js

Issue 1264703003: Implement debugging local unlock keys in chrome://proximity-auth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + fixes Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
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];
+ },
});
« no previous file with comments | « components/proximity_auth/webui/resources/device-list.html ('k') | components/proximity_auth/webui/resources/local-state.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698