| 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 23 matching lines...) Expand all Loading... |
| 34 Bindings.DefaultScriptMapping = class { | 34 Bindings.DefaultScriptMapping = class { |
| 35 /** | 35 /** |
| 36 * @param {!SDK.DebuggerModel} debuggerModel | 36 * @param {!SDK.DebuggerModel} debuggerModel |
| 37 * @param {!Workspace.Workspace} workspace | 37 * @param {!Workspace.Workspace} workspace |
| 38 * @param {!Bindings.DebuggerWorkspaceBinding} debuggerWorkspaceBinding | 38 * @param {!Bindings.DebuggerWorkspaceBinding} debuggerWorkspaceBinding |
| 39 */ | 39 */ |
| 40 constructor(debuggerModel, workspace, debuggerWorkspaceBinding) { | 40 constructor(debuggerModel, workspace, debuggerWorkspaceBinding) { |
| 41 this._debuggerModel = debuggerModel; | 41 this._debuggerModel = debuggerModel; |
| 42 this._debuggerWorkspaceBinding = debuggerWorkspaceBinding; | 42 this._debuggerWorkspaceBinding = debuggerWorkspaceBinding; |
| 43 var projectId = Bindings.DefaultScriptMapping.projectIdForTarget(debuggerMod
el.target()); | 43 var projectId = Bindings.DefaultScriptMapping.projectIdForTarget(debuggerMod
el.target()); |
| 44 this._project = new Bindings.ContentProviderBasedProject(workspace, projectI
d, Workspace.projectTypes.Debugger, ''); | 44 this._project = new Bindings.ContentProviderBasedProject( |
| 45 workspace, projectId, Workspace.projectTypes.Debugger, '', true /* isSer
viceProject */); |
| 45 /** @type {!Map.<string, !Workspace.UISourceCode>} */ | 46 /** @type {!Map.<string, !Workspace.UISourceCode>} */ |
| 46 this._uiSourceCodeForScriptId = new Map(); | 47 this._uiSourceCodeForScriptId = new Map(); |
| 47 /** @type {!Map.<!Workspace.UISourceCode, string>} */ | 48 /** @type {!Map.<!Workspace.UISourceCode, string>} */ |
| 48 this._scriptIdForUISourceCode = new Map(); | 49 this._scriptIdForUISourceCode = new Map(); |
| 49 this._eventListeners = | 50 this._eventListeners = |
| 50 [debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCle
ared, this._debuggerReset, this)]; | 51 [debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCle
ared, this._debuggerReset, this)]; |
| 51 } | 52 } |
| 52 | 53 |
| 53 /** | 54 /** |
| 54 * @param {!Workspace.UISourceCode} uiSourceCode | 55 * @param {!Workspace.UISourceCode} uiSourceCode |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 142 } |
| 142 | 143 |
| 143 dispose() { | 144 dispose() { |
| 144 Common.EventTarget.removeEventListeners(this._eventListeners); | 145 Common.EventTarget.removeEventListeners(this._eventListeners); |
| 145 this._debuggerReset(); | 146 this._debuggerReset(); |
| 146 this._project.dispose(); | 147 this._project.dispose(); |
| 147 } | 148 } |
| 148 }; | 149 }; |
| 149 | 150 |
| 150 Bindings.DefaultScriptMapping._scriptSymbol = Symbol('symbol'); | 151 Bindings.DefaultScriptMapping._scriptSymbol = Symbol('symbol'); |
| OLD | NEW |