1868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 2868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// found in the LICENSE file. 4868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 5868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)'use strict'; 6868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 7868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)/** 8868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * @param {HTMLElement} parentNode Node to be parent for this dialog. 9868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * @constructor 10868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) */ 11868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)function ErrorDialog(parentNode) { 12868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) cr.ui.dialogs.BaseDialog.call(this, parentNode); 13868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)} 14868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 15868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)ErrorDialog.prototype = { 16868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) __proto__: cr.ui.dialogs.BaseDialog.prototype 17868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)}; 18868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 19868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)/** 20868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * One-time initialization of DOM. 21868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * @private 22868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) */ 23868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)ErrorDialog.prototype.initDom_ = function() { 24868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) cr.ui.dialogs.BaseDialog.prototype.initDom_.call(this); 25868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) this.frame_.classList.add('error-dialog-frame'); 26868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) var img = this.document_.createElement('div'); 27868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) img.className = 'error-dialog-img'; 28868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) this.frame_.insertBefore(img, this.text_); 29868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)}; 30