OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @constructor | 6 * @constructor |
7 * @param {!WebInspector.Infobar.Type} type | 7 * @param {!WebInspector.Infobar.Type} type |
8 * @param {!WebInspector.Setting=} disableSetting | 8 * @param {!WebInspector.Setting=} disableSetting |
9 */ | 9 */ |
10 WebInspector.Infobar = function(type, disableSetting) | 10 WebInspector.Infobar = function(type, disableSetting) |
11 { | 11 { |
12 this.element = createElementWithClass("div"); | 12 this.element = createElementWithClass("div"); |
13 this._shadowRoot = this.element.createShadowRoot(); | 13 this._shadowRoot = this.element.createShadowRoot(); |
14 this._shadowRoot.appendChild(WebInspector.View.createStyleElement("ui/infoba
r.css")); | 14 this._shadowRoot.appendChild(WebInspector.Widget.createStyleElement("ui/info
bar.css")); |
15 this._contentElement = this._shadowRoot.createChild("div", "infobar infobar-
" + type); | 15 this._contentElement = this._shadowRoot.createChild("div", "infobar infobar-
" + type); |
16 WebInspector.installComponentRootStyles(this.element); | 16 WebInspector.installComponentRootStyles(this.element); |
17 | 17 |
18 this._contentElement.createChild("label", "icon", "dt-icon-label").type = ty
pe + "-icon"; | 18 this._contentElement.createChild("label", "icon", "dt-icon-label").type = ty
pe + "-icon"; |
19 this._contentElement.createChild("div", "content").createChild("content"); | 19 this._contentElement.createChild("div", "content").createChild("content"); |
20 | 20 |
21 /** @type {?WebInspector.Setting} */ | 21 /** @type {?WebInspector.Setting} */ |
22 this._disableSetting = null; | 22 this._disableSetting = null; |
23 | 23 |
24 if (disableSetting) { | 24 if (disableSetting) { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 }, | 68 }, |
69 | 69 |
70 /** | 70 /** |
71 * @param {?function()} callback | 71 * @param {?function()} callback |
72 */ | 72 */ |
73 setCloseCallback: function(callback) | 73 setCloseCallback: function(callback) |
74 { | 74 { |
75 this._closeCallback = callback; | 75 this._closeCallback = callback; |
76 } | 76 } |
77 } | 77 } |
OLD | NEW |