| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 } | 305 } |
| 306 | 306 |
| 307 /** | 307 /** |
| 308 * @param {!Common.Event} event | 308 * @param {!Common.Event} event |
| 309 */ | 309 */ |
| 310 _workingCopyChanged(event) { | 310 _workingCopyChanged(event) { |
| 311 this._update(); | 311 this._update(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 _workingCopyCommitted(event) { | 314 _workingCopyCommitted(event) { |
| 315 if (this._uiSourceCode.project().type() === Workspace.projectTypes.Snippets) | 315 if (this._uiSourceCode.project().canSetFileContent()) |
| 316 return; | 316 return; |
| 317 if (!this._script) | 317 if (!this._script) |
| 318 return; | 318 return; |
| 319 var debuggerModel = this._resourceScriptMapping._debuggerModel; | 319 var debuggerModel = this._resourceScriptMapping._debuggerModel; |
| 320 var source = this._uiSourceCode.workingCopy(); | 320 var source = this._uiSourceCode.workingCopy(); |
| 321 debuggerModel.setScriptSource(this._script.scriptId, source, scriptSourceWas
Set.bind(this)); | 321 debuggerModel.setScriptSource(this._script.scriptId, source, scriptSourceWas
Set.bind(this)); |
| 322 | 322 |
| 323 /** | 323 /** |
| 324 * @param {?string} error | 324 * @param {?string} error |
| 325 * @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails | 325 * @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails |
| (...skipping 113 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 |