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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.js

Issue 438493002: Added ConsumerManagementService class to handle enroll state and device owner info in boot lockbox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@signin
Patch Set: Fixed the broken test. Created 6 years, 4 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 <include src="../../gaia_auth_host/gaia_auth_host.js"> 9 <include src="../../gaia_auth_host/gaia_auth_host.js">
10 10
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 213
214 /** 214 /**
215 * Event handler that is invoked just before the frame is shown. 215 * Event handler that is invoked just before the frame is shown.
216 * @param {string} data Screen init payload. Url of auth extension start 216 * @param {string} data Screen init payload. Url of auth extension start
217 * page. 217 * page.
218 */ 218 */
219 onBeforeShow: function(data) { 219 onBeforeShow: function(data) {
220 chrome.send('loginUIStateChanged', ['gaia-signin', true]); 220 chrome.send('loginUIStateChanged', ['gaia-signin', true]);
221 $('login-header-bar').signinUIState = 221 $('login-header-bar').signinUIState =
222 this.isEnrollingConsumerManagement_ ? 222 this.isEnrollingConsumerManagement_ ?
223 SIGNIN_UI_STATE.CONSUMER_MANAGEMENT_ENROLLMENT : 223 SIGNIN_UI_STATE.CONSUMER_MANAGEMENT_ENROLLMENT :
224 SIGNIN_UI_STATE.GAIA_SIGNIN; 224 SIGNIN_UI_STATE.GAIA_SIGNIN;
225 225
226 // Ensure that GAIA signin (or loading UI) is actually visible. 226 // Ensure that GAIA signin (or loading UI) is actually visible.
227 window.requestAnimationFrame(function() { 227 window.requestAnimationFrame(function() {
228 chrome.send('loginVisible', ['gaia-loading']); 228 chrome.send('loginVisible', ['gaia-loading']);
229 }); 229 });
230 230
231 // Button header is always visible when sign in is presented. 231 // Button header is always visible when sign in is presented.
232 // Header is hidden once GAIA reports on successful sign in. 232 // Header is hidden once GAIA reports on successful sign in.
233 Oobe.getInstance().headerHidden = false; 233 Oobe.getInstance().headerHidden = false;
234 }, 234 },
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 $('guestSignin').hidden = !data.guestSignin; 311 $('guestSignin').hidden = !data.guestSignin;
312 $('createSupervisedUserPane').hidden = !data.supervisedUsersEnabled; 312 $('createSupervisedUserPane').hidden = !data.supervisedUsersEnabled;
313 313
314 $('createSupervisedUserLinkPlaceholder').hidden = 314 $('createSupervisedUserLinkPlaceholder').hidden =
315 !data.supervisedUsersCanCreate; 315 !data.supervisedUsersCanCreate;
316 $('createSupervisedUserNoManagerText').hidden = 316 $('createSupervisedUserNoManagerText').hidden =
317 data.supervisedUsersCanCreate; 317 data.supervisedUsersCanCreate;
318 $('createSupervisedUserNoManagerText').textContent = 318 $('createSupervisedUserNoManagerText').textContent =
319 data.supervisedUsersRestrictionReason; 319 data.supervisedUsersRestrictionReason;
320 320
321 $('consumerManagementEnrollment').hidden = 321 var isEnrollingConsumerManagement = data.isEnrollingConsumerManagement;
322 !data.isEnrollingConsumerManagement; 322 $('consumerManagementEnrollment').hidden = !isEnrollingConsumerManagement;
323 323
324 this.isShowUsers_ = data.isShowUsers; 324 this.isShowUsers_ = data.isShowUsers;
325 this.updateCancelButtonState(); 325 this.updateCancelButtonState();
326 326
327 this.isEnrollingConsumerManagement_ = data.isEnrollingConsumerManagement; 327 this.isEnrollingConsumerManagement_ = isEnrollingConsumerManagement;
328 328
329 // Sign-in right panel is hidden if all of its items are hidden. 329 // Sign-in right panel is hidden if all of its items are hidden.
330 var noRightPanel = $('gaia-signin-reason').hidden && 330 var noRightPanel = $('gaia-signin-reason').hidden &&
331 $('createAccount').hidden && 331 $('createAccount').hidden &&
332 $('guestSignin').hidden && 332 $('guestSignin').hidden &&
333 $('createSupervisedUserPane').hidden && 333 $('createSupervisedUserPane').hidden &&
334 $('consumerManagementEnrollment').hidden; 334 $('consumerManagementEnrollment').hidden;
335 this.classList.toggle('no-right-panel', noRightPanel); 335 this.classList.toggle('no-right-panel', noRightPanel);
336 if (Oobe.getInstance().currentScreen === this) 336 if (Oobe.getInstance().currentScreen === this)
337 Oobe.getInstance().updateScreenSize(this); 337 Oobe.getInstance().updateScreenSize(this);
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 * For more info see C++ class 'WebUILoginView' which calls this method. 648 * For more info see C++ class 'WebUILoginView' which calls this method.
649 * @param {number} error Error code. 649 * @param {number} error Error code.
650 * @param {string} url The URL that failed to load. 650 * @param {string} url The URL that failed to load.
651 */ 651 */
652 onFrameError: function(error, url) { 652 onFrameError: function(error, url) {
653 this.error_ = error; 653 this.error_ = error;
654 chrome.send('frameLoadingCompleted', [this.error_]); 654 chrome.send('frameLoadingCompleted', [this.error_]);
655 }, 655 },
656 }; 656 };
657 }); 657 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/header_bar.js ('k') | chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698