Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * @implements {WebInspector.SourceMapping} | 7 * @implements {WebInspector.SourceMapping} |
| 8 * @param {!WebInspector.Workspace} workspace | 8 * @param {!WebInspector.Workspace} workspace |
| 9 * @param {!WebInspector.DebuggerModel} debuggerModel | 9 * @param {!WebInspector.DebuggerModel} debuggerModel |
| 10 */ | 10 */ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 77 switch (uiSourceCode.contentType()) { | 77 switch (uiSourceCode.contentType()) { |
| 78 case WebInspector.resourceTypes.Document: | 78 case WebInspector.resourceTypes.Document: |
| 79 isInlineScript = true; | 79 isInlineScript = true; |
| 80 break; | 80 break; |
| 81 case WebInspector.resourceTypes.Script: | 81 case WebInspector.resourceTypes.Script: |
| 82 isInlineScript = false; | 82 isInlineScript = false; |
| 83 break; | 83 break; |
| 84 default: | 84 default: |
| 85 return []; | 85 return []; |
| 86 } | 86 } |
| 87 if (!uiSourceCode.url) { | |
| 88 var scriptId = uiSourceCode._sourceMapping._scriptIdForUISourceCode. get(uiSourceCode); | |
|
pfeldman
2014/03/25 18:31:10
Too much private field access for one line.
lushnikov
2014/03/25 18:58:42
Done.
| |
| 89 var script = this._debuggerModel.scriptForId(scriptId); | |
| 90 return [ script ]; | |
| 91 } | |
| 87 var scripts = this._debuggerModel.scriptsForSourceURL(uiSourceCode.url); | 92 var scripts = this._debuggerModel.scriptsForSourceURL(uiSourceCode.url); |
| 88 | 93 |
| 89 function filterOutIncorrectInlineType(script) | 94 function filterOutIncorrectInlineType(script) |
| 90 { | 95 { |
| 91 return script.isInlineScript() === isInlineScript; | 96 return script.isInlineScript() === isInlineScript; |
| 92 } | 97 } |
| 93 | 98 |
| 94 return scripts.filter(filterOutIncorrectInlineType); | 99 return scripts.filter(filterOutIncorrectInlineType); |
| 95 }, | 100 }, |
| 96 | 101 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 380 }, | 385 }, |
| 381 | 386 |
| 382 /** | 387 /** |
| 383 * @param {!WebInspector.UISourceCode} uiSourceCode | 388 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 384 */ | 389 */ |
| 385 _discardFormattedUISourceCodeScript: function(uiSourceCode) | 390 _discardFormattedUISourceCodeScript: function(uiSourceCode) |
| 386 { | 391 { |
| 387 this._scriptMapping._discardFormattedUISourceCodeScript(uiSourceCode); | 392 this._scriptMapping._discardFormattedUISourceCodeScript(uiSourceCode); |
| 388 } | 393 } |
| 389 } | 394 } |
| OLD | NEW |