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

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: 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 c1545baf24d50e1656c1513c0f26a944c12ee5fd..870c6ef50499329cbaae3648e0402bc6c491f60f 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -129,6 +129,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;
@@ -157,6 +158,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(
@@ -724,6 +728,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
*/
@@ -831,6 +843,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;

Powered by Google App Engine
This is Rietveld 408576698