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="../../login/screen.js"></include> | 9 <include src="../../login/screen.js"></include> |
10 <include src="../user_images_grid.js"></include> | 10 <include src="../user_images_grid.js"></include> |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 chrome.send('oauthEnrollClose', ['done']); | 313 chrome.send('oauthEnrollClose', ['done']); |
314 }; | 314 }; |
315 | 315 |
316 /** | 316 /** |
317 * Shows/hides login UI control bar with buttons like [Shut down]. | 317 * Shows/hides login UI control bar with buttons like [Shut down]. |
318 */ | 318 */ |
319 Oobe.showControlBar = function(show) { | 319 Oobe.showControlBar = function(show) { |
320 Oobe.getInstance().headerHidden = !show; | 320 Oobe.getInstance().headerHidden = !show; |
321 }; | 321 }; |
322 | 322 |
| 323 /** |
| 324 * Sets the current state of the virtual keyboard (shown/hidden). |
| 325 */ |
| 326 Oobe.setKeyboardState = function(shown) { |
| 327 Oobe.getInstance().virtualKeyboardShown = shown; |
| 328 }; |
| 329 |
| 330 /** |
| 331 * Sets the current size of the client area (display size). |
| 332 * @param {number} width client area width |
| 333 * @param {number} height client area height |
| 334 */ |
| 335 Oobe.setClientAreaSize = function(width, height) { |
| 336 Oobe.getInstance().setClientAreaSize(width, height); |
| 337 }; |
| 338 |
323 // Export | 339 // Export |
324 return { | 340 return { |
325 Oobe: Oobe | 341 Oobe: Oobe |
326 }; | 342 }; |
327 }); | 343 }); |
328 | 344 |
329 var Oobe = cr.ui.Oobe; | 345 var Oobe = cr.ui.Oobe; |
330 | 346 |
331 // Allow selection events on components with editable text (password field) | 347 // Allow selection events on components with editable text (password field) |
332 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) | 348 // bug (http://code.google.com/p/chromium/issues/detail?id=125863) |
(...skipping 21 matching lines...) Expand all Loading... |
354 cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { | 370 cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() { |
355 // This screen is async-loaded so we manually trigger i18n processing. | 371 // This screen is async-loaded so we manually trigger i18n processing. |
356 i18nTemplate.process($('oauth-enrollment'), loadTimeData); | 372 i18nTemplate.process($('oauth-enrollment'), loadTimeData); |
357 // Delayed binding since this isn't defined yet. | 373 // Delayed binding since this isn't defined yet. |
358 login.OAuthEnrollmentScreen.register(); | 374 login.OAuthEnrollmentScreen.register(); |
359 }); | 375 }); |
360 | 376 |
361 // Delayed binding since this isn't defined yet. | 377 // Delayed binding since this isn't defined yet. |
362 cr.ui.Oobe.initialize(); | 378 cr.ui.Oobe.initialize(); |
363 }); | 379 }); |
OLD | NEW |