| 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="test_util.js"> | 9 <include src="test_util.js"> |
| 10 <include src="../../../../../ui/login/screen.js"> | 10 <include src="../../../../../ui/login/screen.js"> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 window.setTimeout(showHeaderBar, HEADER_BAR_DELAY_MS); | 103 window.setTimeout(showHeaderBar, HEADER_BAR_DELAY_MS); |
| 104 } else { | 104 } else { |
| 105 document.body.classList.remove('oobe-display'); | 105 document.body.classList.remove('oobe-display'); |
| 106 Oobe.getInstance().prepareForLoginDisplay_(); | 106 Oobe.getInstance().prepareForLoginDisplay_(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 Oobe.getInstance().headerHidden = false; | 109 Oobe.getInstance().headerHidden = false; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 /** | 112 /** |
| 113 * When |showShutdown| is set to "true", the shutdown button is shown and the |
| 114 * reboot button hidden. If set to "false", the reboot button is visible and |
| 115 * the shutdown button hidden. |
| 116 */ |
| 117 Oobe.showShutdown = function(showShutdown) { |
| 118 $('login-header-bar').showShutdownButton = showShutdown; |
| 119 $('login-header-bar').showRebootButton = !showShutdown; |
| 120 }; |
| 121 |
| 122 /** |
| 113 * Enables keyboard driven flow. | 123 * Enables keyboard driven flow. |
| 114 */ | 124 */ |
| 115 Oobe.enableKeyboardFlow = function(value) { | 125 Oobe.enableKeyboardFlow = function(value) { |
| 116 // Don't show header bar for OOBE. | 126 // Don't show header bar for OOBE. |
| 117 Oobe.getInstance().forceKeyboardFlow = value; | 127 Oobe.getInstance().forceKeyboardFlow = value; |
| 118 }; | 128 }; |
| 119 | 129 |
| 120 /** | 130 /** |
| 121 * Disables signin UI. | 131 * Disables signin UI. |
| 122 */ | 132 */ |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 document.addEventListener('DOMContentLoaded', function() { | 386 document.addEventListener('DOMContentLoaded', function() { |
| 377 if (!window['WAIT_FOR_POLYMER']) { | 387 if (!window['WAIT_FOR_POLYMER']) { |
| 378 initializeOobe(); | 388 initializeOobe(); |
| 379 return; | 389 return; |
| 380 } | 390 } |
| 381 window.addEventListener('polymer-ready', function() { | 391 window.addEventListener('polymer-ready', function() { |
| 382 initializeOobe(); | 392 initializeOobe(); |
| 383 }); | 393 }); |
| 384 }); | 394 }); |
| 385 })(); | 395 })(); |
| OLD | NEW |