| 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @implements {WebInspector.CSSSourceMapping} | 33 * @implements {WebInspector.CSSSourceMapping} |
| 34 * @param {!WebInspector.CSSStyleModel} cssModel | 34 * @param {!WebInspector.CSSStyleModel} cssModel |
| 35 * @param {!WebInspector.Workspace} workspace | |
| 36 * @param {!WebInspector.NetworkMapping} networkMapping | 35 * @param {!WebInspector.NetworkMapping} networkMapping |
| 37 * @param {!WebInspector.NetworkProject} networkProject | 36 * @param {!WebInspector.NetworkProject} networkProject |
| 38 */ | 37 */ |
| 39 WebInspector.SASSSourceMapping = function(cssModel, workspace, networkMapping, n
etworkProject) | 38 WebInspector.SASSSourceMapping = function(cssModel, networkMapping, networkProje
ct) |
| 40 { | 39 { |
| 41 this._cssModel = cssModel; | 40 this._cssModel = cssModel; |
| 42 this._workspace = workspace; | |
| 43 this._networkProject = networkProject; | 41 this._networkProject = networkProject; |
| 44 this._reset(); | 42 this._reset(); |
| 45 WebInspector.moduleSetting("cssSourceMapsEnabled").addChangeListener(this._t
oggleSourceMapSupport, this); | 43 WebInspector.moduleSetting("cssSourceMapsEnabled").addChangeListener(this._t
oggleSourceMapSupport, this); |
| 46 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheet
Changed, this._styleSheetChanged, this); | 44 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.StyleSheet
Changed, this._styleSheetChanged, this); |
| 47 this._workspace.addEventListener(WebInspector.Workspace.Events.ProjectRemove
d, this._reset, this); | 45 cssModel.target().resourceTreeModel.addEventListener(WebInspector.ResourceTr
eeModel.EventTypes.MainFrameNavigated, this._reset, this); |
| 48 this._networkMapping = networkMapping; | 46 this._networkMapping = networkMapping; |
| 49 } | 47 } |
| 50 | 48 |
| 51 WebInspector.SASSSourceMapping.prototype = { | 49 WebInspector.SASSSourceMapping.prototype = { |
| 52 /** | 50 /** |
| 53 * @param {!WebInspector.Event} event | 51 * @param {!WebInspector.Event} event |
| 54 */ | 52 */ |
| 55 _styleSheetChanged: function(event) | 53 _styleSheetChanged: function(event) |
| 56 { | 54 { |
| 57 var id = /** @type {!CSSAgent.StyleSheetId} */ (event.data.styleSheetId)
; | 55 var id = /** @type {!CSSAgent.StyleSheetId} */ (event.data.styleSheetId)
; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 227 |
| 230 _reset: function() | 228 _reset: function() |
| 231 { | 229 { |
| 232 /** @type {!Object.<string, !Array.<function(?WebInspector.SourceMap)>>}
*/ | 230 /** @type {!Object.<string, !Array.<function(?WebInspector.SourceMap)>>}
*/ |
| 233 this._pendingSourceMapLoadingCallbacks = {}; | 231 this._pendingSourceMapLoadingCallbacks = {}; |
| 234 /** @type {!Object.<string, !WebInspector.SourceMap>} */ | 232 /** @type {!Object.<string, !WebInspector.SourceMap>} */ |
| 235 this._sourceMapByURL = {}; | 233 this._sourceMapByURL = {}; |
| 236 this._sourceMapByStyleSheetURL = {}; | 234 this._sourceMapByStyleSheetURL = {}; |
| 237 } | 235 } |
| 238 } | 236 } |
| OLD | NEW |