| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 Oobe.getInstance().prepareForLoginDisplay_(); | 106 Oobe.getInstance().prepareForLoginDisplay_(); |
| 107 // Ensure header bar is visible when switching to Login UI from oobe. | 107 // Ensure header bar is visible when switching to Login UI from oobe. |
| 108 if (Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE) | 108 if (Oobe.getInstance().displayType == DISPLAY_TYPE.OOBE) |
| 109 login.HeaderBar.animateIn(); | 109 login.HeaderBar.animateIn(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 Oobe.getInstance().headerHidden = false; | 112 Oobe.getInstance().headerHidden = false; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 /** | 115 /** |
| 116 * When |showShutdown| is set to "true", the shutdown button is shown and the |
| 117 * reboot button hidden. If set to "false", the reboot button is visible and |
| 118 * the shutdown button hidden. |
| 119 */ |
| 120 Oobe.showShutdown = function(showShutdown) { |
| 121 $('login-header-bar').showShutdownButton = showShutdown; |
| 122 $('login-header-bar').showRebootButton = !showShutdown; |
| 123 }; |
| 124 |
| 125 /** |
| 116 * Enables keyboard driven flow. | 126 * Enables keyboard driven flow. |
| 117 */ | 127 */ |
| 118 Oobe.enableKeyboardFlow = function(value) { | 128 Oobe.enableKeyboardFlow = function(value) { |
| 119 // Don't show header bar for OOBE. | 129 // Don't show header bar for OOBE. |
| 120 Oobe.getInstance().forceKeyboardFlow = value; | 130 Oobe.getInstance().forceKeyboardFlow = value; |
| 121 }; | 131 }; |
| 122 | 132 |
| 123 /** | 133 /** |
| 124 * Disables signin UI. | 134 * Disables signin UI. |
| 125 */ | 135 */ |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 document.addEventListener('DOMContentLoaded', function() { | 389 document.addEventListener('DOMContentLoaded', function() { |
| 380 if (!window['WAIT_FOR_POLYMER']) { | 390 if (!window['WAIT_FOR_POLYMER']) { |
| 381 initializeOobe(); | 391 initializeOobe(); |
| 382 return; | 392 return; |
| 383 } | 393 } |
| 384 window.addEventListener('polymer-ready', function() { | 394 window.addEventListener('polymer-ready', function() { |
| 385 initializeOobe(); | 395 initializeOobe(); |
| 386 }); | 396 }); |
| 387 }); | 397 }); |
| 388 })(); | 398 })(); |
| OLD | NEW |