| Index: components/proximity_auth/webui/resources/proximity_auth.js
|
| diff --git a/components/proximity_auth/webui/resources/proximity_auth.js b/components/proximity_auth/webui/resources/proximity_auth.js
|
| index c9d1928f7af9410bb9fae2ef98b226129d23f023..764c6ae06f21aa38a42e783055b110ef0f88bdf0 100644
|
| --- a/components/proximity_auth/webui/resources/proximity_auth.js
|
| +++ b/components/proximity_auth/webui/resources/proximity_auth.js
|
| @@ -26,7 +26,7 @@ ProximityAuth = {
|
| class CryptAuthController {
|
| constructor() {
|
| this.elements_ = {
|
| - publicKey: document.getElementById('public-key'),
|
| + localDeviceId: document.getElementById('local-device-id'),
|
| gcmRegistration: document.getElementById('gcm-registration'),
|
| currentEid: document.getElementById('current-eid'),
|
| enrollmentTitle: document.getElementById('enrollment-title'),
|
| @@ -43,6 +43,14 @@ class CryptAuthController {
|
| this.elements_.deviceSyncButton.onclick = this.forceDeviceSync_.bind(this);
|
| }
|
|
|
| + /**
|
| + * Sets the local device's ID. Note that this value is truncated since the
|
| + * full value is very long and does not cleanly fit on the screen.
|
| + */
|
| + setLocalDeviceId(deviceIdTruncated) {
|
| + this.elements_.localDeviceId.textContent = deviceIdTruncated;
|
| + }
|
| +
|
| /**
|
| * Update the enrollment state in the UI.
|
| */
|
| @@ -253,12 +261,18 @@ class EligibleDevicesController {
|
| * Interface for the native WebUI to call into our JS.
|
| */
|
| LocalStateInterface = {
|
| - onGotLocalState: function(enrollmentState, deviceSyncState, remoteDevices) {
|
| + onGotLocalState: function(
|
| + localDeviceId, enrollmentState, deviceSyncState, remoteDevices) {
|
| + LocalStateInterface.setLocalDeviceId(localDeviceId);
|
| LocalStateInterface.onEnrollmentStateChanged(enrollmentState);
|
| LocalStateInterface.onDeviceSyncStateChanged(deviceSyncState);
|
| LocalStateInterface.onRemoteDevicesChanged(remoteDevices);
|
| },
|
|
|
| + setLocalDeviceId: function(localDeviceId) {
|
| + ProximityAuth.cryptauthController_.setLocalDeviceId(localDeviceId);
|
| + },
|
| +
|
| onEnrollmentStateChanged: function(enrollmentState) {
|
| ProximityAuth.cryptauthController_.updateEnrollmentState(enrollmentState);
|
| },
|
|
|