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

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.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/gaia_auth_host/authenticator.js
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index 221d5ba4cbf19c73ae2437198f304cbaf3ed1bd4..55a24f76def03b64ded67f09c3da9dd0b3ff65ca 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -130,6 +130,7 @@ cr.define('cr.login', function() {
this.skipForNow_ = false;
this.authFlow = AuthFlow.DEFAULT;
this.authDomain = '';
+ this.videoEnabled = false;
this.idpOrigin_ = null;
this.continueUrl_ = null;
this.continueUrlWithoutParams_ = null;
@@ -158,6 +159,9 @@ cr.define('cr.login', function() {
this.samlHandler_.addEventListener(
'authPageLoaded',
this.onAuthPageLoaded_.bind(this));
+ this.samlHandler_.addEventListener(
+ 'videoEnabled',
+ this.onVideoEnabled_.bind(this));
this.webview_.addEventListener('droplink', this.onDropLink_.bind(this));
this.webview_.addEventListener(
@@ -208,6 +212,7 @@ cr.define('cr.login', function() {
this.trusted_ = true;
this.authFlow = AuthFlow.DEFAULT;
this.samlHandler_.reset();
+ this.videoEnabled = false;
};
/**
@@ -733,6 +738,14 @@ cr.define('cr.login', function() {
};
/**
+ * Invoked when |samlHandler_| fires 'videoEnabled' event.
+ * @private
+ */
+ Authenticator.prototype.onVideoEnabled_ = function(e) {
+ this.videoEnabled = true;
+ };
+
+ /**
* Invoked when a link is dropped on the webview.
* @private
*/
@@ -840,6 +853,12 @@ cr.define('cr.login', function() {
*/
cr.defineProperty(Authenticator, 'authDomain');
+ /**
+ * True if the page has requested media access.
+ * @type {boolean}
+ */
+ cr.defineProperty(Authenticator, 'videoEnabled');
+
Authenticator.AuthFlow = AuthFlow;
Authenticator.AuthMode = AuthMode;
Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS;
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_gaia_signin.js ('k') | chrome/browser/resources/gaia_auth_host/saml_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698