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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * @param {HTMLElement} parentNode Node to be parent for this dialog. | 8 * @param {HTMLElement} parentNode Node to be parent for this dialog. |
9 * @constructor | 9 * @constructor |
10 */ | 10 */ |
11 function ErrorDialog(parentNode) { | 11 function ErrorDialog(parentNode) { |
12 cr.ui.dialogs.BaseDialog.call(this, parentNode); | 12 cr.ui.dialogs.BaseDialog.call(this, parentNode); |
13 } | 13 } |
14 | 14 |
15 ErrorDialog.prototype = { | 15 ErrorDialog.prototype = { |
16 __proto__: cr.ui.dialogs.BaseDialog.prototype | 16 __proto__: cr.ui.dialogs.BaseDialog.prototype |
17 }; | 17 }; |
18 | 18 |
19 /** | 19 /** |
20 * One-time initialization of DOM. | 20 * One-time initialization of DOM. |
21 * @private | 21 * @private |
22 */ | 22 */ |
23 ErrorDialog.prototype.initDom_ = function() { | 23 ErrorDialog.prototype.initDom_ = function() { |
24 cr.ui.dialogs.BaseDialog.prototype.initDom_.call(this); | 24 cr.ui.dialogs.BaseDialog.prototype.initDom_.call(this); |
25 this.frame_.classList.add('error-dialog-frame'); | 25 this.frame_.classList.add('error-dialog-frame'); |
26 var img = this.document_.createElement('div'); | 26 var img = this.document_.createElement('div'); |
27 img.className = 'error-dialog-img'; | 27 img.className = 'error-dialog-img'; |
28 this.frame_.insertBefore(img, this.text_); | 28 this.frame_.insertBefore(img, this.text_); |
29 }; | 29 }; |
OLD | NEW |