| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 */ | 524 */ |
| 525 _fireContentAvailable(content) { | 525 _fireContentAvailable(content) { |
| 526 this._contentLoaded = true; | 526 this._contentLoaded = true; |
| 527 this._content = content; | 527 this._content = content; |
| 528 | 528 |
| 529 var callback = this._requestContentCallback; | 529 var callback = this._requestContentCallback; |
| 530 this._requestContentCallback = null; | 530 this._requestContentCallback = null; |
| 531 this._requestContentPromise = null; | 531 this._requestContentPromise = null; |
| 532 | 532 |
| 533 callback.call(null, content); | 533 callback.call(null, content); |
| 534 this.dispatchEventToListeners(Workspace.UISourceCode.Events.ContentLoaded); |
| 534 } | 535 } |
| 535 | 536 |
| 536 /** | 537 /** |
| 537 * @return {boolean} | 538 * @return {boolean} |
| 538 */ | 539 */ |
| 539 contentLoaded() { | 540 contentLoaded() { |
| 540 return this._contentLoaded; | 541 return this._contentLoaded; |
| 541 } | 542 } |
| 542 | 543 |
| 543 /** | 544 /** |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 * @param {string} type | 648 * @param {string} type |
| 648 * @return {!Set<!Workspace.UISourceCode.LineMarker>} | 649 * @return {!Set<!Workspace.UISourceCode.LineMarker>} |
| 649 */ | 650 */ |
| 650 decorationsForType(type) { | 651 decorationsForType(type) { |
| 651 return this._decorations.get(type); | 652 return this._decorations.get(type); |
| 652 } | 653 } |
| 653 }; | 654 }; |
| 654 | 655 |
| 655 /** @enum {symbol} */ | 656 /** @enum {symbol} */ |
| 656 Workspace.UISourceCode.Events = { | 657 Workspace.UISourceCode.Events = { |
| 658 ContentLoaded: Symbol('ContentLoaded'), |
| 657 WorkingCopyChanged: Symbol('WorkingCopyChanged'), | 659 WorkingCopyChanged: Symbol('WorkingCopyChanged'), |
| 658 WorkingCopyCommitted: Symbol('WorkingCopyCommitted'), | 660 WorkingCopyCommitted: Symbol('WorkingCopyCommitted'), |
| 659 TitleChanged: Symbol('TitleChanged'), | 661 TitleChanged: Symbol('TitleChanged'), |
| 660 SourceMappingChanged: Symbol('SourceMappingChanged'), | 662 SourceMappingChanged: Symbol('SourceMappingChanged'), |
| 661 MessageAdded: Symbol('MessageAdded'), | 663 MessageAdded: Symbol('MessageAdded'), |
| 662 MessageRemoved: Symbol('MessageRemoved'), | 664 MessageRemoved: Symbol('MessageRemoved'), |
| 663 LineDecorationAdded: Symbol('LineDecorationAdded'), | 665 LineDecorationAdded: Symbol('LineDecorationAdded'), |
| 664 LineDecorationRemoved: Symbol('LineDecorationRemoved') | 666 LineDecorationRemoved: Symbol('LineDecorationRemoved') |
| 665 }; | 667 }; |
| 666 | 668 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 Workspace.UISourceCodeMetadata = class { | 941 Workspace.UISourceCodeMetadata = class { |
| 940 /** | 942 /** |
| 941 * @param {?Date} modificationTime | 943 * @param {?Date} modificationTime |
| 942 * @param {?number} contentSize | 944 * @param {?number} contentSize |
| 943 */ | 945 */ |
| 944 constructor(modificationTime, contentSize) { | 946 constructor(modificationTime, contentSize) { |
| 945 this.modificationTime = modificationTime; | 947 this.modificationTime = modificationTime; |
| 946 this.contentSize = contentSize; | 948 this.contentSize = contentSize; |
| 947 } | 949 } |
| 948 }; | 950 }; |
| OLD | NEW |