1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 * @fileoverview A simple message box screen implementation.
9 login
.createScreen('FatalErrorScreen', 'fatal-error', function() { return {
15 * Callback to run when the screen is dismissed.
21 * Saved hidden status of 'progress-dots'.
24 savedProgressDotsHidden_
: null,
27 decorate: function() {
28 $('fatal-error-dismiss-button').addEventListener(
29 'click', this.onDismiss_
.bind(this));
32 get defaultControl() {
33 return $('fatal-error-dismiss-button');
37 * Invoked when user clicks on the ok button.
39 onDismiss_: function() {
41 $('progress-dots').hidden
= this.savedProgressDotsHidden_
;
45 * Shows the no password warning screen.
46 * @param {function()} callback The callback to be invoked when the
47 * screen is dismissed.
49 show: function(callback
) {
50 Oobe
.getInstance().headerHidden
= true;
51 this.callback_
= callback
;
53 Oobe
.showScreen({id
: SCREEN_FATAL_ERROR
});
55 this.savedProgressDotsHidden_
= $('progress-dots').hidden
;
56 $('progress-dots').hidden
= true;