| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * | 10 * |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 __proto__: WebInspector.SourceFrame.prototype | 209 __proto__: WebInspector.SourceFrame.prototype |
| 210 } | 210 } |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * @constructor | 213 * @constructor |
| 214 * @param {!WebInspector.UISourceCodeFrame.Infobar.Level} level | 214 * @param {!WebInspector.UISourceCodeFrame.Infobar.Level} level |
| 215 * @param {string} message | 215 * @param {string} message |
| 216 */ | 216 */ |
| 217 WebInspector.UISourceCodeFrame.Infobar = function(level, message) | 217 WebInspector.UISourceCodeFrame.Infobar = function(level, message) |
| 218 { | 218 { |
| 219 this.element = document.createElementWithClass("div", "source-frame-infobar
source-frame-infobar-" + level); | 219 this.element = createElementWithClass("div", "source-frame-infobar source-fr
ame-infobar-" + level); |
| 220 this._mainRow = this.element.createChild("div", "source-frame-infobar-main-r
ow"); | 220 this._mainRow = this.element.createChild("div", "source-frame-infobar-main-r
ow"); |
| 221 this._detailsContainer = this.element.createChild("span", "source-frame-info
bar-details-container"); | 221 this._detailsContainer = this.element.createChild("span", "source-frame-info
bar-details-container"); |
| 222 | 222 |
| 223 this._mainRow.createChild("span", "source-frame-infobar-icon"); | 223 this._mainRow.createChild("span", "source-frame-infobar-icon"); |
| 224 this._mainRow.createChild("span", "source-frame-infobar-row-message").textCo
ntent = message; | 224 this._mainRow.createChild("span", "source-frame-infobar-row-message").textCo
ntent = message; |
| 225 | 225 |
| 226 this._toggleElement = this._mainRow.createChild("div", "source-frame-infobar
-toggle source-frame-infobar-link"); | 226 this._toggleElement = this._mainRow.createChild("div", "source-frame-infobar
-toggle source-frame-infobar-link"); |
| 227 this._toggleElement.addEventListener("click", this._onToggleDetails.bind(thi
s), false); | 227 this._toggleElement.addEventListener("click", this._onToggleDetails.bind(thi
s), false); |
| 228 | 228 |
| 229 this._closeElement = this._mainRow.createChild("div", "close-button"); | 229 this._closeElement = this._mainRow.createChild("div", "close-button"); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 return detailsRowMessage; | 286 return detailsRowMessage; |
| 287 }, | 287 }, |
| 288 | 288 |
| 289 dispose: function() | 289 dispose: function() |
| 290 { | 290 { |
| 291 this.element.remove(); | 291 this.element.remove(); |
| 292 this._onResize(); | 292 this._onResize(); |
| 293 delete this._uiSourceCodeFrame; | 293 delete this._uiSourceCodeFrame; |
| 294 } | 294 } |
| 295 } | 295 } |
| OLD | NEW |