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

Unified Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.js

Issue 1966853002: Add indication of camera use on SAML webcam logins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reset videoEnabled state when restarting auth Created 4 years, 7 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: chrome/browser/resources/chromeos/login/screen_gaia_signin.js
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
index e259c4b942c4f3ab30f1021ef72c6824e83b4b32..4c60e44b4aca827fd883bf3c6446e6444c260618 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -215,6 +215,8 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
this.onAuthDomainChange_.bind(this));
this.gaiaAuthHost_.addEventListener('authFlowChange',
this.onAuthFlowChange_.bind(this));
+ this.gaiaAuthHost_.addEventListener('videoEnabledChange',
+ this.onVideoEnabledChange_.bind(this));
this.gaiaAuthHost_.addEventListener('loadAbort',
this.onLoadAbortMessage_.bind(this));
@@ -603,12 +605,36 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
},
/**
+ * Helper function to update the title bar.
+ */
+ updateSamlNotice_: function() {
+ if (this.gaiaAuthHost_.videoEnabled) {
+ $('saml-notice-message').textContent = loadTimeData.getStringF(
+ 'samlNoticeWithVideo',
+ this.gaiaAuthHost_.authDomain);
+ $('saml-notice-recording-indicator').hidden = false;
+ $('saml-notice-container').style.justifyContent = 'flex-start';
+ } else {
+ $('saml-notice-message').textContent = loadTimeData.getStringF(
+ 'samlNotice',
+ this.gaiaAuthHost_.authDomain);
+ $('saml-notice-recording-indicator').hidden = true;
+ $('saml-notice-container').style.justifyContent = 'center';
+ }
+ },
+
+ /**
* Invoked when the authDomain property is changed on the GAIA host.
*/
onAuthDomainChange_: function() {
- $('saml-notice-message').textContent = loadTimeData.getStringF(
- 'samlNotice',
- this.gaiaAuthHost_.authDomain);
+ this.updateSamlNotice_();
+ },
+
+ /**
+ * Invoked when the videoEnabled property is changed on the GAIA host.
+ */
+ onVideoEnabledChange_: function() {
+ this.updateSamlNotice_();
},
/**

Powered by Google App Engine
This is Rietveld 408576698