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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Oobe signin screen implementation. 6 * @fileoverview Oobe signin screen implementation.
7 */ 7 */
8 8
9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { 9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
10 // GAIA animation guard timer. Started when GAIA page is loaded 10 // GAIA animation guard timer. Started when GAIA page is loaded
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 this.gaiaAuthHost_.insecureContentBlockedCallback = 208 this.gaiaAuthHost_.insecureContentBlockedCallback =
209 this.onInsecureContentBlocked_.bind(this); 209 this.onInsecureContentBlocked_.bind(this);
210 this.gaiaAuthHost_.missingGaiaInfoCallback = 210 this.gaiaAuthHost_.missingGaiaInfoCallback =
211 this.missingGaiaInfo_.bind(this); 211 this.missingGaiaInfo_.bind(this);
212 this.gaiaAuthHost_.samlApiUsedCallback = 212 this.gaiaAuthHost_.samlApiUsedCallback =
213 this.samlApiUsed_.bind(this); 213 this.samlApiUsed_.bind(this);
214 this.gaiaAuthHost_.addEventListener('authDomainChange', 214 this.gaiaAuthHost_.addEventListener('authDomainChange',
215 this.onAuthDomainChange_.bind(this)); 215 this.onAuthDomainChange_.bind(this));
216 this.gaiaAuthHost_.addEventListener('authFlowChange', 216 this.gaiaAuthHost_.addEventListener('authFlowChange',
217 this.onAuthFlowChange_.bind(this)); 217 this.onAuthFlowChange_.bind(this));
218 this.gaiaAuthHost_.addEventListener('videoEnabledChange',
219 this.onVideoEnabledChange_.bind(this));
218 220
219 this.gaiaAuthHost_.addEventListener('loadAbort', 221 this.gaiaAuthHost_.addEventListener('loadAbort',
220 this.onLoadAbortMessage_.bind(this)); 222 this.onLoadAbortMessage_.bind(this));
221 this.gaiaAuthHost_.addEventListener( 223 this.gaiaAuthHost_.addEventListener(
222 'identifierEntered', this.onIdentifierEnteredMessage_.bind(this)); 224 'identifierEntered', this.onIdentifierEnteredMessage_.bind(this));
223 225
224 this.navigation_.addEventListener('back', function() { 226 this.navigation_.addEventListener('back', function() {
225 this.navigation_.backVisible = false; 227 this.navigation_.backVisible = false;
226 this.getSigninFrame_().back(); 228 this.getSigninFrame_().back();
227 }.bind(this)); 229 }.bind(this));
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 598
597 /** 599 /**
598 * Whether the current auth flow is SAML. 600 * Whether the current auth flow is SAML.
599 */ 601 */
600 isSAML: function() { 602 isSAML: function() {
601 return this.gaiaAuthHost_.authFlow == 603 return this.gaiaAuthHost_.authFlow ==
602 cr.login.GaiaAuthHost.AuthFlow.SAML; 604 cr.login.GaiaAuthHost.AuthFlow.SAML;
603 }, 605 },
604 606
605 /** 607 /**
608 * Helper function to update the title bar.
609 */
610 updateSamlNotice_: function() {
611 if (this.gaiaAuthHost_.videoEnabled) {
612 $('saml-notice-message').textContent = loadTimeData.getStringF(
613 'samlNoticeWithVideo',
614 this.gaiaAuthHost_.authDomain);
615 $('saml-notice-recording-indicator').hidden = false;
616 $('saml-notice-container').style.justifyContent = 'left';
Kevin Cernekee 2016/05/10 21:05:42 This part doesn't actually work. Not sure why. I
emaxx 2016/05/13 17:44:03 There is no "left" value among the allowed values
Kevin Cernekee 2016/05/13 18:39:04 Done.
617 } else {
618 $('saml-notice-message').textContent = loadTimeData.getStringF(
619 'samlNotice',
620 this.gaiaAuthHost_.authDomain);
621 }
emaxx 2016/05/13 17:44:03 Even though the videoEnabled should never change f
Kevin Cernekee 2016/05/13 18:39:04 Done.
622 },
623
624 /**
606 * Invoked when the authDomain property is changed on the GAIA host. 625 * Invoked when the authDomain property is changed on the GAIA host.
607 */ 626 */
608 onAuthDomainChange_: function() { 627 onAuthDomainChange_: function() {
609 $('saml-notice-message').textContent = loadTimeData.getStringF( 628 this.updateSamlNotice_();
610 'samlNotice',
611 this.gaiaAuthHost_.authDomain);
612 }, 629 },
613 630
614 /** 631 /**
632 * Invoked when the videoEnabled property is changed on the GAIA host.
633 */
634 onVideoEnabledChange_: function() {
635 this.updateSamlNotice_();
636 },
637
638 /**
615 * Invoked when the authFlow property is changed on the GAIA host. 639 * Invoked when the authFlow property is changed on the GAIA host.
616 */ 640 */
617 onAuthFlowChange_: function() { 641 onAuthFlowChange_: function() {
618 var isSAML = this.isSAML(); 642 var isSAML = this.isSAML();
619 643
620 this.classList.toggle('full-width', isSAML); 644 this.classList.toggle('full-width', isSAML);
621 $('saml-notice-container').hidden = !isSAML; 645 $('saml-notice-container').hidden = !isSAML;
622 646
623 if (Oobe.getInstance().currentScreen === this) { 647 if (Oobe.getInstance().currentScreen === this) {
624 Oobe.getInstance().updateScreenSize(this); 648 Oobe.getInstance().updateScreenSize(this);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 this.classList.toggle('whitelist-error', show); 1008 this.classList.toggle('whitelist-error', show);
985 this.loading = !show; 1009 this.loading = !show;
986 1010
987 if (!show) 1011 if (!show)
988 Oobe.showSigninUI(); 1012 Oobe.showSigninUI();
989 1013
990 this.updateControlsState(); 1014 this.updateControlsState();
991 } 1015 }
992 }; 1016 };
993 }); 1017 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698