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 Login UI based on a stripped down OOBE controller. | 6 * @fileoverview Login UI based on a stripped down OOBE controller. |
7 * TODO(xiyuan): Refactoring this to get a better structure. | 7 * TODO(xiyuan): Refactoring this to get a better structure. |
8 */ | 8 */ |
9 | 9 |
10 var localStrings = new LocalStrings(); | 10 var localStrings = new LocalStrings(); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 }; | 255 }; |
256 | 256 |
257 /** | 257 /** |
258 * Displays the given |termsOfService| on the Terms of Service screen. | 258 * Displays the given |termsOfService| on the Terms of Service screen. |
259 * @param {string} termsOfService The terms of service, as plain text. | 259 * @param {string} termsOfService The terms of service, as plain text. |
260 */ | 260 */ |
261 Oobe.setTermsOfService = function(termsOfService) { | 261 Oobe.setTermsOfService = function(termsOfService) { |
262 oobe.TermsOfServiceScreen.setTermsOfService(termsOfService); | 262 oobe.TermsOfServiceScreen.setTermsOfService(termsOfService); |
263 }; | 263 }; |
264 | 264 |
| 265 /** |
| 266 * Clears password field in user-pod. |
| 267 */ |
| 268 Oobe.clearUserPodPassword = function() { |
| 269 DisplayManager.clearUserPodPassword(); |
| 270 }; |
| 271 |
265 // Export | 272 // Export |
266 return { | 273 return { |
267 Oobe: Oobe | 274 Oobe: Oobe |
268 }; | 275 }; |
269 }); | 276 }); |
270 | 277 |
271 var Oobe = cr.ui.Oobe; | 278 var Oobe = cr.ui.Oobe; |
272 | 279 |
273 // Allow selection events on components with editable text (password field) | 280 // Allow selection events on components with editable text (password field) |
274 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 281 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
275 disableTextSelectAndDrag(function(e) { | 282 disableTextSelectAndDrag(function(e) { |
276 var src = e.target; | 283 var src = e.target; |
277 return src instanceof HTMLTextAreaElement || | 284 return src instanceof HTMLTextAreaElement || |
278 src instanceof HTMLInputElement && | 285 src instanceof HTMLInputElement && |
279 /text|password|search/.test(src.type); | 286 /text|password|search/.test(src.type); |
280 }); | 287 }); |
281 | 288 |
282 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); | 289 document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize); |
OLD | NEW |