| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 WebInspector.UISourceCode = function(project, parentPath, name, originURL, url,
contentType) | 43 WebInspector.UISourceCode = function(project, parentPath, name, originURL, url,
contentType) |
| 44 { | 44 { |
| 45 this._project = project; | 45 this._project = project; |
| 46 this._parentPath = parentPath; | 46 this._parentPath = parentPath; |
| 47 this._name = name; | 47 this._name = name; |
| 48 this._originURL = originURL; | 48 this._originURL = originURL; |
| 49 this._url = url; | 49 this._url = url; |
| 50 this._contentType = contentType; | 50 this._contentType = contentType; |
| 51 /** @type {!Array.<function(?string)>} */ | 51 /** @type {!Array.<function(?string)>} */ |
| 52 this._requestContentCallbacks = []; | 52 this._requestContentCallbacks = []; |
| 53 /** @type {!Array.<!WebInspector.PresentationMessage>} */ | |
| 54 this._consoleMessages = []; | |
| 55 | 53 |
| 56 /** @type {!Array.<!WebInspector.Revision>} */ | 54 /** @type {!Array.<!WebInspector.Revision>} */ |
| 57 this.history = []; | 55 this.history = []; |
| 58 } | 56 } |
| 59 | 57 |
| 58 /** |
| 59 * @enum {string} |
| 60 */ |
| 60 WebInspector.UISourceCode.Events = { | 61 WebInspector.UISourceCode.Events = { |
| 61 WorkingCopyChanged: "WorkingCopyChanged", | 62 WorkingCopyChanged: "WorkingCopyChanged", |
| 62 WorkingCopyCommitted: "WorkingCopyCommitted", | 63 WorkingCopyCommitted: "WorkingCopyCommitted", |
| 63 TitleChanged: "TitleChanged", | 64 TitleChanged: "TitleChanged", |
| 64 SavedStateUpdated: "SavedStateUpdated", | 65 SavedStateUpdated: "SavedStateUpdated", |
| 65 ConsoleMessageAdded: "ConsoleMessageAdded", | |
| 66 ConsoleMessageRemoved: "ConsoleMessageRemoved", | |
| 67 ConsoleMessagesCleared: "ConsoleMessagesCleared", | |
| 68 SourceMappingChanged: "SourceMappingChanged", | 66 SourceMappingChanged: "SourceMappingChanged", |
| 69 } | 67 } |
| 70 | 68 |
| 71 WebInspector.UISourceCode.prototype = { | 69 WebInspector.UISourceCode.prototype = { |
| 72 /** | 70 /** |
| 73 * @return {string} | 71 * @return {string} |
| 74 */ | 72 */ |
| 75 get url() | 73 get url() |
| 76 { | 74 { |
| 77 return this._url; | 75 return this._url; |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 566 |
| 569 /** | 567 /** |
| 570 * @return {boolean} | 568 * @return {boolean} |
| 571 */ | 569 */ |
| 572 contentLoaded: function() | 570 contentLoaded: function() |
| 573 { | 571 { |
| 574 return this._contentLoaded; | 572 return this._contentLoaded; |
| 575 }, | 573 }, |
| 576 | 574 |
| 577 /** | 575 /** |
| 578 * @return {!Array.<!WebInspector.PresentationMessage>} | |
| 579 */ | |
| 580 consoleMessages: function() | |
| 581 { | |
| 582 return this._consoleMessages; | |
| 583 }, | |
| 584 | |
| 585 /** | |
| 586 * @param {!WebInspector.PresentationMessage} message | |
| 587 */ | |
| 588 consoleMessageAdded: function(message) | |
| 589 { | |
| 590 this._consoleMessages.push(message); | |
| 591 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe
ssageAdded, message); | |
| 592 }, | |
| 593 | |
| 594 /** | |
| 595 * @param {!WebInspector.PresentationMessage} message | |
| 596 */ | |
| 597 consoleMessageRemoved: function(message) | |
| 598 { | |
| 599 this._consoleMessages.remove(message); | |
| 600 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe
ssageRemoved, message); | |
| 601 }, | |
| 602 | |
| 603 consoleMessagesCleared: function() | |
| 604 { | |
| 605 this._consoleMessages = []; | |
| 606 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe
ssagesCleared); | |
| 607 }, | |
| 608 | |
| 609 /** | |
| 610 * @param {number} lineNumber | 576 * @param {number} lineNumber |
| 611 * @param {number=} columnNumber | 577 * @param {number=} columnNumber |
| 612 * @return {!WebInspector.UILocation} | 578 * @return {!WebInspector.UILocation} |
| 613 */ | 579 */ |
| 614 uiLocation: function(lineNumber, columnNumber) | 580 uiLocation: function(lineNumber, columnNumber) |
| 615 { | 581 { |
| 616 if (typeof columnNumber === "undefined") | 582 if (typeof columnNumber === "undefined") |
| 617 columnNumber = 0; | 583 columnNumber = 0; |
| 618 return new WebInspector.UILocation(this, lineNumber, columnNumber); | 584 return new WebInspector.UILocation(this, lineNumber, columnNumber); |
| 619 }, | 585 }, |
| 620 | 586 |
| 621 __proto__: WebInspector.Object.prototype | 587 __proto__: WebInspector.Object.prototype |
| 622 } | 588 } |
| 623 | 589 |
| 624 /** | 590 /** |
| 625 * @interface | |
| 626 */ | |
| 627 WebInspector.PresentationMessage = function() {} | |
| 628 | |
| 629 /** | |
| 630 * @constructor | 591 * @constructor |
| 631 * @param {!WebInspector.UISourceCode} uiSourceCode | 592 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 632 * @param {number} lineNumber | 593 * @param {number} lineNumber |
| 633 * @param {number} columnNumber | 594 * @param {number} columnNumber |
| 634 */ | 595 */ |
| 635 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber) | 596 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber) |
| 636 { | 597 { |
| 637 this.uiSourceCode = uiSourceCode; | 598 this.uiSourceCode = uiSourceCode; |
| 638 this.lineNumber = lineNumber; | 599 this.lineNumber = lineNumber; |
| 639 this.columnNumber = columnNumber; | 600 this.columnNumber = columnNumber; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 * @param {string} query | 702 * @param {string} query |
| 742 * @param {boolean} caseSensitive | 703 * @param {boolean} caseSensitive |
| 743 * @param {boolean} isRegex | 704 * @param {boolean} isRegex |
| 744 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback | 705 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback |
| 745 */ | 706 */ |
| 746 searchInContent: function(query, caseSensitive, isRegex, callback) | 707 searchInContent: function(query, caseSensitive, isRegex, callback) |
| 747 { | 708 { |
| 748 callback([]); | 709 callback([]); |
| 749 } | 710 } |
| 750 } | 711 } |
| OLD | NEW |