Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(982)

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_fatal_error.js

Issue 2944703004: Run clang-format on .js files in c/b/r/chromeos (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 A simple message box screen implementation. 6 * @fileoverview A simple message box screen implementation.
7 */ 7 */
8 8
9 login.createScreen('FatalErrorScreen', 'fatal-error', function() { return { 9 login.createScreen('FatalErrorScreen', 'fatal-error', function() {
10 EXTERNAL_API: [ 10 return {
11 'show' 11 EXTERNAL_API: ['show'],
12 ],
13 12
14 /** 13 /**
15 * Callback to run when the screen is dismissed. 14 * Callback to run when the screen is dismissed.
16 * @type {function()} 15 * @type {function()}
17 */ 16 */
18 callback_: null, 17 callback_: null,
19 18
20 /** 19 /**
21 * Saved UI states to restore when this screen hides. 20 * Saved UI states to restore when this screen hides.
22 * @type {Object} 21 * @type {Object}
23 */ 22 */
24 savedUIStates_: {}, 23 savedUIStates_: {},
25 24
26 /** @override */ 25 /** @override */
27 decorate: function() { 26 decorate: function() {
28 $('fatal-error-card').addEventListener( 27 $('fatal-error-card')
29 'buttonclick', this.onDismiss_.bind(this)); 28 .addEventListener('buttonclick', this.onDismiss_.bind(this));
30 }, 29 },
31 30
32 /** @override */ 31 /** @override */
33 get defaultControl() { 32 get defaultControl() {
34 return $('fatal-error-card').submitButton; 33 return $('fatal-error-card').submitButton;
35 }, 34 },
36 35
37 /** @override */ 36 /** @override */
38 onBeforeShow: function() { 37 onBeforeShow: function() {
39 this.savedUIStates_.progressDotHidden = $('progress-dots').hidden; 38 this.savedUIStates_.progressDotHidden = $('progress-dots').hidden;
(...skipping 23 matching lines...) Expand all
63 * screen is dismissed. 62 * screen is dismissed.
64 */ 63 */
65 show: function(message, buttonLabel, callback) { 64 show: function(message, buttonLabel, callback) {
66 $('fatal-error-card').textContent = message; 65 $('fatal-error-card').textContent = message;
67 $('fatal-error-card').buttonLabel = buttonLabel; 66 $('fatal-error-card').buttonLabel = buttonLabel;
68 this.callback_ = callback; 67 this.callback_ = callback;
69 Oobe.showScreen({id: SCREEN_FATAL_ERROR}); 68 Oobe.showScreen({id: SCREEN_FATAL_ERROR});
70 } 69 }
71 }; 70 };
72 }); 71 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698