| 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 * @param {!WebInspector.DebuggerWorkspaceBinding} debuggerWorkspaceBinding | 7 * @param {!WebInspector.DebuggerWorkspaceBinding} debuggerWorkspaceBinding |
| 8 * @param {!WebInspector.NetworkMapping} networkMapping | |
| 9 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
| 10 */ | 9 */ |
| 11 WebInspector.BlackboxManager = function(debuggerWorkspaceBinding, networkMapping
) | 10 WebInspector.BlackboxManager = function(debuggerWorkspaceBinding) |
| 12 { | 11 { |
| 13 this._debuggerWorkspaceBinding = debuggerWorkspaceBinding; | 12 this._debuggerWorkspaceBinding = debuggerWorkspaceBinding; |
| 14 this._networkMapping = networkMapping; | |
| 15 | 13 |
| 16 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this
); | 14 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.ParsedScriptSource, this._parsedScriptSource, this
); |
| 17 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.GlobalObjectCleared, this._globalObjectCleared, th
is); | 15 WebInspector.targetManager.addModelListener(WebInspector.DebuggerModel, WebI
nspector.DebuggerModel.Events.GlobalObjectCleared, this._globalObjectCleared, th
is); |
| 18 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this.
_patternChanged.bind(this)); | 16 WebInspector.moduleSetting("skipStackFramesPattern").addChangeListener(this.
_patternChanged.bind(this)); |
| 19 WebInspector.moduleSetting("skipContentScripts").addChangeListener(this._pat
ternChanged.bind(this)); | 17 WebInspector.moduleSetting("skipContentScripts").addChangeListener(this._pat
ternChanged.bind(this)); |
| 20 | 18 |
| 21 /** @type {!Map<!WebInspector.DebuggerModel, !Map<string, !Array<!DebuggerAg
ent.ScriptPosition>>>} */ | 19 /** @type {!Map<!WebInspector.DebuggerModel, !Map<string, !Array<!DebuggerAg
ent.ScriptPosition>>>} */ |
| 22 this._debuggerModelData = new Map(); | 20 this._debuggerModelData = new Map(); |
| 23 /** @type {!Map<string, boolean>} */ | 21 /** @type {!Map<string, boolean>} */ |
| 24 this._isBlackboxedURLCache = new Map(); | 22 this._isBlackboxedURLCache = new Map(); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 return a.columnNumber - b.columnNumber; | 186 return a.columnNumber - b.columnNumber; |
| 189 } | 187 } |
| 190 }, | 188 }, |
| 191 | 189 |
| 192 /** | 190 /** |
| 193 * @param {!WebInspector.UISourceCode} uiSourceCode | 191 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 194 * @return {?string} | 192 * @return {?string} |
| 195 */ | 193 */ |
| 196 _uiSourceCodeURL: function(uiSourceCode) | 194 _uiSourceCodeURL: function(uiSourceCode) |
| 197 { | 195 { |
| 198 var networkURL = this._networkMapping.networkURL(uiSourceCode); | 196 return uiSourceCode.project().type() === WebInspector.projectTypes.Debug
ger ? null : uiSourceCode.url(); |
| 199 var projectType = uiSourceCode.project().type(); | |
| 200 if (projectType === WebInspector.projectTypes.Debugger) | |
| 201 return null; | |
| 202 var url = projectType === WebInspector.projectTypes.Formatter ? uiSource
Code.url() : networkURL; | |
| 203 return url ? url : null; | |
| 204 }, | 197 }, |
| 205 | 198 |
| 206 /** | 199 /** |
| 207 * @param {!WebInspector.UISourceCode} uiSourceCode | 200 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 208 * @return {boolean} | 201 * @return {boolean} |
| 209 */ | 202 */ |
| 210 canBlackboxUISourceCode: function(uiSourceCode) | 203 canBlackboxUISourceCode: function(uiSourceCode) |
| 211 { | 204 { |
| 212 var url = this._uiSourceCodeURL(uiSourceCode); | 205 var url = this._uiSourceCodeURL(uiSourceCode); |
| 213 return url ? !!this._urlToRegExpString(url) : false; | 206 return url ? !!this._urlToRegExpString(url) : false; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 if (scheme === "chrome-extension") | 446 if (scheme === "chrome-extension") |
| 454 prefix += parsedURL.host + "\\b"; | 447 prefix += parsedURL.host + "\\b"; |
| 455 prefix += ".*"; | 448 prefix += ".*"; |
| 456 } | 449 } |
| 457 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
b"); | 450 return prefix + name.escapeForRegExp() + (url.endsWith(name) ? "$" : "\\
b"); |
| 458 } | 451 } |
| 459 } | 452 } |
| 460 | 453 |
| 461 /** @type {!WebInspector.BlackboxManager} */ | 454 /** @type {!WebInspector.BlackboxManager} */ |
| 462 WebInspector.blackboxManager; | 455 WebInspector.blackboxManager; |
| OLD | NEW |