cros: Update SAML flow.
[chromium-blink-merge.git] / chrome / browser / resources / chromeos / login / screen_fatal_error.js
blobe7650e076f16fb6428105b157a59ca6b523a7877
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.
5 /**
6 * @fileoverview A simple message box screen implementation.
7 */
9 login.createScreen('FatalErrorScreen', 'fatal-error', function() { return {
10 EXTERNAL_API: [
11 'show'
14 /**
15 * Callback to run when the screen is dismissed.
16 * @type {function()}
18 callback_: null,
20 /**
21 * Saved hidden status of 'progress-dots'.
22 * @type {boolean}
24 savedProgressDotsHidden_: null,
26 /** @override */
27 decorate: function() {
28 $('fatal-error-dismiss-button').addEventListener(
29 'click', this.onDismiss_.bind(this));
32 get defaultControl() {
33 return $('fatal-error-dismiss-button');
36 /**
37 * Invoked when user clicks on the ok button.
39 onDismiss_: function() {
40 this.callback_();
41 $('progress-dots').hidden = this.savedProgressDotsHidden_;
44 /**
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;
59 });