| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 this._uiSourceCodeToScriptFile.set(uiSourceCode, scriptFile); | 147 this._uiSourceCodeToScriptFile.set(uiSourceCode, scriptFile); |
| 148 else | 148 else |
| 149 this._uiSourceCodeToScriptFile.remove(uiSourceCode); | 149 this._uiSourceCodeToScriptFile.remove(uiSourceCode); |
| 150 } | 150 } |
| 151 | 151 |
| 152 /** | 152 /** |
| 153 * @param {!Common.Event} event | 153 * @param {!Common.Event} event |
| 154 */ | 154 */ |
| 155 _uiSourceCodeAdded(event) { | 155 _uiSourceCodeAdded(event) { |
| 156 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 156 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| 157 if (uiSourceCode.isFromServiceProject()) | 157 if (uiSourceCode.project().isServiceProject()) |
| 158 return; | 158 return; |
| 159 var scripts = this._scriptsForUISourceCode(uiSourceCode); | 159 var scripts = this._scriptsForUISourceCode(uiSourceCode); |
| 160 if (!scripts.length) | 160 if (!scripts.length) |
| 161 return; | 161 return; |
| 162 | 162 |
| 163 this._bindUISourceCodeToScripts(uiSourceCode, scripts); | 163 this._bindUISourceCodeToScripts(uiSourceCode, scripts); |
| 164 } | 164 } |
| 165 | 165 |
| 166 /** | 166 /** |
| 167 * @param {!Common.Event} event | 167 * @param {!Common.Event} event |
| 168 */ | 168 */ |
| 169 _uiSourceCodeRemoved(event) { | 169 _uiSourceCodeRemoved(event) { |
| 170 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 170 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| 171 if (uiSourceCode.isFromServiceProject() || !this._boundUISourceCodes.has(uiS
ourceCode)) | 171 if (uiSourceCode.project().isServiceProject() || !this._boundUISourceCodes.h
as(uiSourceCode)) |
| 172 return; | 172 return; |
| 173 | 173 |
| 174 this._unbindUISourceCode(uiSourceCode); | 174 this._unbindUISourceCode(uiSourceCode); |
| 175 } | 175 } |
| 176 | 176 |
| 177 /** | 177 /** |
| 178 * @param {!Workspace.UISourceCode} uiSourceCode | 178 * @param {!Workspace.UISourceCode} uiSourceCode |
| 179 */ | 179 */ |
| 180 _updateLocations(uiSourceCode) { | 180 _updateLocations(uiSourceCode) { |
| 181 var scripts = this._scriptsForUISourceCode(uiSourceCode); | 181 var scripts = this._scriptsForUISourceCode(uiSourceCode); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 hasSourceMapURL() { | 439 hasSourceMapURL() { |
| 440 return this._script && !!this._script.sourceMapURL; | 440 return this._script && !!this._script.sourceMapURL; |
| 441 } | 441 } |
| 442 }; | 442 }; |
| 443 | 443 |
| 444 /** @enum {symbol} */ | 444 /** @enum {symbol} */ |
| 445 Bindings.ResourceScriptFile.Events = { | 445 Bindings.ResourceScriptFile.Events = { |
| 446 DidMergeToVM: Symbol('DidMergeToVM'), | 446 DidMergeToVM: Symbol('DidMergeToVM'), |
| 447 DidDivergeFromVM: Symbol('DidDivergeFromVM'), | 447 DidDivergeFromVM: Symbol('DidDivergeFromVM'), |
| 448 }; | 448 }; |
| OLD | NEW |