OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 Display manager for WebUI OOBE and login. | 6 * @fileoverview Display manager for WebUI OOBE and login. |
7 */ | 7 */ |
8 | 8 |
9 // TODO(xiyuan): Find a better to share those constants. | 9 // TODO(xiyuan): Find a better to share those constants. |
10 const SCREEN_SIGNIN = 'signin'; | 10 const SCREEN_SIGNIN = 'signin'; |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // TODO(xiyuan): Figure out why the above fails and get rid of this. | 333 // TODO(xiyuan): Figure out why the above fails and get rid of this. |
334 anchorPos.left += 150; // (640 - 340) / 2 | 334 anchorPos.left += 150; // (640 - 340) / 2 |
335 | 335 |
336 // TODO(xiyuan): Find a reliable way to align with Gaia UI. | 336 // TODO(xiyuan): Find a reliable way to align with Gaia UI. |
337 anchorPos.left += 60; | 337 anchorPos.left += 60; |
338 anchorPos.top += 105; | 338 anchorPos.top += 105; |
339 } else if (currentScreenId == SCREEN_ACCOUNT_PICKER && | 339 } else if (currentScreenId == SCREEN_ACCOUNT_PICKER && |
340 $('pod-row').activatedPod) { | 340 $('pod-row').activatedPod) { |
341 const MAX_LOGIN_ATTEMMPTS_IN_POD = 3; | 341 const MAX_LOGIN_ATTEMMPTS_IN_POD = 3; |
342 if (loginAttempts > MAX_LOGIN_ATTEMMPTS_IN_POD) { | 342 if (loginAttempts > MAX_LOGIN_ATTEMMPTS_IN_POD) { |
343 Oobe.showSigninUI($('pod-row').activatedPod.user.emailAddress); | 343 $('pod-row').activatedPod.showSigninUI(); |
344 return; | 344 return; |
345 } | 345 } |
346 | 346 |
347 anchor = $('pod-row').activatedPod.mainInput; | 347 anchor = $('pod-row').activatedPod.mainInput; |
348 } | 348 } |
349 if (!anchor && !anchorPos) { | 349 if (!anchor && !anchorPos) { |
350 console.log('Warning: Failed to find anchor for error :' + | 350 console.log('Warning: Failed to find anchor for error :' + |
351 message); | 351 message); |
352 return; | 352 return; |
353 } | 353 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 */ | 391 */ |
392 DisplayManager.setLabelText = function(labelId, labelText) { | 392 DisplayManager.setLabelText = function(labelId, labelText) { |
393 $(labelId).textContent = labelText; | 393 $(labelId).textContent = labelText; |
394 }; | 394 }; |
395 | 395 |
396 // Export | 396 // Export |
397 return { | 397 return { |
398 DisplayManager: DisplayManager | 398 DisplayManager: DisplayManager |
399 }; | 399 }; |
400 }); | 400 }); |
OLD | NEW |