OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 Common OOBE controller methods. | 6 * @fileoverview Common OOBE controller methods. |
7 */ | 7 */ |
8 | 8 |
9 <include src="../../../../../ui/login/screen.js"> | 9 <include src="../../../../../ui/login/screen.js"> |
10 <include src="screen_context.js"> | 10 <include src="screen_context.js"> |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 }; | 254 }; |
255 | 255 |
256 /** | 256 /** |
257 * Login for telemetry. | 257 * Login for telemetry. |
258 * @param {string} username Login username. | 258 * @param {string} username Login username. |
259 * @param {string} password Login password. | 259 * @param {string} password Login password. |
260 */ | 260 */ |
261 Oobe.loginForTesting = function(username, password) { | 261 Oobe.loginForTesting = function(username, password) { |
262 Oobe.disableSigninUI(); | 262 Oobe.disableSigninUI(); |
263 chrome.send('skipToLoginForTesting', [username]); | 263 chrome.send('skipToLoginForTesting', [username]); |
264 chrome.send('completeLogin', [username, password, false]); | 264 // TODO(rogerta): expose gaiaId to caller? |
| 265 chrome.send('completeLogin', ['fake-gaia-id', username, password, false]); |
265 }; | 266 }; |
266 | 267 |
267 /** | 268 /** |
268 * Guest login for telemetry. | 269 * Guest login for telemetry. |
269 */ | 270 */ |
270 Oobe.guestLoginForTesting = function() { | 271 Oobe.guestLoginForTesting = function() { |
271 Oobe.skipToLoginForTesting(); | 272 Oobe.skipToLoginForTesting(); |
272 chrome.send('launchIncognito'); | 273 chrome.send('launchIncognito'); |
273 }; | 274 }; |
274 | 275 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { | 363 cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { |
363 // This screen is async-loaded so we manually trigger i18n processing. | 364 // This screen is async-loaded so we manually trigger i18n processing. |
364 i18nTemplate.process($('oauth-enrollment'), loadTimeData); | 365 i18nTemplate.process($('oauth-enrollment'), loadTimeData); |
365 // Delayed binding since this isn't defined yet. | 366 // Delayed binding since this isn't defined yet. |
366 login.OAuthEnrollmentScreen.register(); | 367 login.OAuthEnrollmentScreen.register(); |
367 }); | 368 }); |
368 | 369 |
369 // Delayed binding since this isn't defined yet. | 370 // Delayed binding since this isn't defined yet. |
370 cr.ui.Oobe.initialize(); | 371 cr.ui.Oobe.initialize(); |
371 }); | 372 }); |
OLD | NEW |