OLD | NEW |
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 eula screen implementation. | 6 * @fileoverview Oobe eula screen implementation. |
7 */ | 7 */ |
8 | 8 |
9 login.createScreen('EulaScreen', 'eula', function() { | 9 login.createScreen('EulaScreen', 'eula', function() { |
10 var CONTEXT_KEY_USAGE_STATS_ENABLED = 'usageStatsEnabled'; | 10 var CONTEXT_KEY_USAGE_STATS_ENABLED = 'usageStatsEnabled'; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 }); | 110 }); |
111 buttons.push(acceptButton); | 111 buttons.push(acceptButton); |
112 | 112 |
113 return buttons; | 113 return buttons; |
114 }, | 114 }, |
115 | 115 |
116 /** | 116 /** |
117 * Returns a control which should receive an initial focus. | 117 * Returns a control which should receive an initial focus. |
118 */ | 118 */ |
119 get defaultControl() { | 119 get defaultControl() { |
| 120 if (loadTimeData.getString('newOobeUI') == 'on') |
| 121 return $('oobe-eula-md'); |
| 122 |
120 return $('accept-button').disabled ? $('back-button') : | 123 return $('accept-button').disabled ? $('back-button') : |
121 $('accept-button'); | 124 $('accept-button'); |
122 }, | 125 }, |
123 | 126 |
124 enableKeyboardFlow: function() { | 127 enableKeyboardFlow: function() { |
125 $('eula-chrome-credits-link').hidden = false; | 128 $('eula-chrome-credits-link').hidden = false; |
126 $('eula-chromeos-credits-link').hidden = false; | 129 $('eula-chromeos-credits-link').hidden = false; |
127 $('eula-chrome-credits-link').addEventListener('click', | 130 $('eula-chrome-credits-link').addEventListener('click', |
128 function(event) { | 131 function(event) { |
129 chrome.send('eulaOnChromeCredits'); | 132 chrome.send('eulaOnChromeCredits'); |
(...skipping 27 matching lines...) Expand all Loading... |
157 if ($('cros-eula-frame').src) { | 160 if ($('cros-eula-frame').src) { |
158 $('cros-eula-frame').src = $('cros-eula-frame').src; | 161 $('cros-eula-frame').src = $('cros-eula-frame').src; |
159 } | 162 } |
160 if ($('oem-eula-frame').src) { | 163 if ($('oem-eula-frame').src) { |
161 $('oem-eula-frame').src = $('oem-eula-frame').src; | 164 $('oem-eula-frame').src = $('oem-eula-frame').src; |
162 } | 165 } |
163 }, | 166 }, |
164 }; | 167 }; |
165 }); | 168 }); |
166 | 169 |
OLD | NEW |