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 cr.define('oobe', function() { | 5 cr.define('oobe', function() { |
6 /** | 6 /** |
7 * Creates a new oobe screen div. | 7 * Creates a new oobe screen div. |
8 * @constructor | 8 * @constructor |
9 * @extends {HTMLDivElement} | 9 * @extends {HTMLDivElement} |
10 */ | 10 */ |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 /** | 31 /** |
32 * Header text of the screen. | 32 * Header text of the screen. |
33 * @type {string} | 33 * @type {string} |
34 */ | 34 */ |
35 get header() { | 35 get header() { |
36 return localStrings.getString('loginHeader'); | 36 return localStrings.getString('loginHeader'); |
37 }, | 37 }, |
38 | 38 |
39 /** | 39 /** |
| 40 * Event handler that is invoked just before the frame is shown. |
| 41 * @param {object} data Screen init payload. |
| 42 */ |
| 43 onBeforeShow: function(data) { |
| 44 // Reload the gaia frame. |
| 45 $('gaia-local-login').src = 'chrome://oobe/gaialogin'; |
| 46 }, |
| 47 |
| 48 /** |
40 * Buttons in oobe wizard's button strip. | 49 * Buttons in oobe wizard's button strip. |
41 * @type {array} Array of Buttons. | 50 * @type {array} Array of Buttons. |
42 */ | 51 */ |
43 get buttons() { | 52 get buttons() { |
44 var buttons = []; | 53 var buttons = []; |
45 | 54 |
46 var closeButton = this.ownerDocument.createElement('button'); | 55 var closeButton = this.ownerDocument.createElement('button'); |
47 closeButton.id = 'close-button'; | 56 closeButton.id = 'close-button'; |
48 closeButton.textContent = localStrings.getString('confirmationClose'); | 57 closeButton.textContent = localStrings.getString('confirmationClose'); |
49 closeButton.addEventListener('click', function(e) { | 58 closeButton.addEventListener('click', function(e) { |
(...skipping 11 matching lines...) Expand all Loading... |
61 EnrollmentScreen.showConfirmationScreen = function() { | 70 EnrollmentScreen.showConfirmationScreen = function() { |
62 $('enroll-login-screen').hidden = true; | 71 $('enroll-login-screen').hidden = true; |
63 $('enroll-confirmation-screen').hidden = false; | 72 $('enroll-confirmation-screen').hidden = false; |
64 $('close-button').classList.add('visible'); | 73 $('close-button').classList.add('visible'); |
65 }; | 74 }; |
66 | 75 |
67 return { | 76 return { |
68 EnrollmentScreen: EnrollmentScreen | 77 EnrollmentScreen: EnrollmentScreen |
69 }; | 78 }; |
70 }); | 79 }); |
OLD | NEW |