Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: Source/devtools/front_end/workspace/UISourceCode.js

Issue 471433004: DevTools: Split out the "workspace" and "bindings" modules from "sdk" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Extract StaticContentProvider, remove stray jsdoc Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 31
32 /** 32 /**
33 * @constructor 33 * @constructor
34 * @extends {WebInspector.Object} 34 * @extends {WebInspector.Object}
35 * @implements {WebInspector.ContentProvider} 35 * @implements {WebInspector.ContentProvider}
36 * @implements {WebInspector.SourceCode}
36 * @param {!WebInspector.Project} project 37 * @param {!WebInspector.Project} project
37 * @param {string} parentPath 38 * @param {string} parentPath
38 * @param {string} name 39 * @param {string} name
39 * @param {string} originURL 40 * @param {string} originURL
40 * @param {string} url 41 * @param {string} url
41 * @param {!WebInspector.ResourceType} contentType 42 * @param {!WebInspector.ResourceType} contentType
42 */ 43 */
43 WebInspector.UISourceCode = function(project, parentPath, name, originURL, url, contentType) 44 WebInspector.UISourceCode = function(project, parentPath, name, originURL, url, contentType)
44 { 45 {
45 this._project = project; 46 this._project = project;
46 this._parentPath = parentPath; 47 this._parentPath = parentPath;
47 this._name = name; 48 this._name = name;
48 this._originURL = originURL; 49 this._originURL = originURL;
49 this._url = url; 50 this._url = url;
50 this._contentType = contentType; 51 this._contentType = contentType;
51 /** @type {!Array.<function(?string)>} */ 52 /** @type {!Array.<function(?string)>} */
52 this._requestContentCallbacks = []; 53 this._requestContentCallbacks = [];
53 /** @type {!Array.<!WebInspector.PresentationConsoleMessage>} */ 54 /** @type {!Array.<!WebInspector.PresentationMessage>} */
54 this._consoleMessages = []; 55 this._consoleMessages = [];
55 56
56 /** @type {!Array.<!WebInspector.Revision>} */ 57 /** @type {!Array.<!WebInspector.Revision>} */
57 this.history = []; 58 this.history = [];
58 } 59 }
59 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",
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 569
569 /** 570 /**
570 * @return {boolean} 571 * @return {boolean}
571 */ 572 */
572 contentLoaded: function() 573 contentLoaded: function()
573 { 574 {
574 return this._contentLoaded; 575 return this._contentLoaded;
575 }, 576 },
576 577
577 /** 578 /**
578 * @return {!Array.<!WebInspector.PresentationConsoleMessage>} 579 * @return {!Array.<!WebInspector.PresentationMessage>}
vsevik 2014/08/14 07:42:52 We should move PresentationConsoleMessageHelper to
579 */ 580 */
580 consoleMessages: function() 581 consoleMessages: function()
581 { 582 {
582 return this._consoleMessages; 583 return this._consoleMessages;
583 }, 584 },
584 585
585 /** 586 /**
586 * @param {!WebInspector.PresentationConsoleMessage} message 587 * @param {!WebInspector.PresentationMessage} message
587 */ 588 */
588 consoleMessageAdded: function(message) 589 consoleMessageAdded: function(message)
589 { 590 {
590 this._consoleMessages.push(message); 591 this._consoleMessages.push(message);
591 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageAdded, message); 592 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageAdded, message);
592 }, 593 },
593 594
594 /** 595 /**
595 * @param {!WebInspector.PresentationConsoleMessage} message 596 * @param {!WebInspector.PresentationMessage} message
596 */ 597 */
597 consoleMessageRemoved: function(message) 598 consoleMessageRemoved: function(message)
598 { 599 {
599 this._consoleMessages.remove(message); 600 this._consoleMessages.remove(message);
600 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageRemoved, message); 601 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageRemoved, message);
601 }, 602 },
602 603
603 consoleMessagesCleared: function() 604 consoleMessagesCleared: function()
604 { 605 {
605 this._consoleMessages = []; 606 this._consoleMessages = [];
606 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssagesCleared); 607 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssagesCleared);
607 }, 608 },
608 609
609 /** 610 /**
610 * @param {number} lineNumber 611 * @param {number} lineNumber
611 * @param {number=} columnNumber 612 * @param {number=} columnNumber
612 * @return {!WebInspector.UILocation} 613 * @return {!WebInspector.UILocation}
613 */ 614 */
614 uiLocation: function(lineNumber, columnNumber) 615 uiLocation: function(lineNumber, columnNumber)
615 { 616 {
616 if (typeof columnNumber === "undefined") 617 if (typeof columnNumber === "undefined")
617 columnNumber = 0; 618 columnNumber = 0;
618 return new WebInspector.UILocation(this, lineNumber, columnNumber); 619 return new WebInspector.UILocation(this, lineNumber, columnNumber);
619 }, 620 },
620 621
621 __proto__: WebInspector.Object.prototype 622 __proto__: WebInspector.Object.prototype
622 } 623 }
623 624
624 /** 625 /**
626 * @interface
627 */
628 WebInspector.PresentationMessage = function() {}
629
630 /**
625 * @constructor 631 * @constructor
632 * @implements {WebInspector.SourceLocation}
626 * @param {!WebInspector.UISourceCode} uiSourceCode 633 * @param {!WebInspector.UISourceCode} uiSourceCode
627 * @param {number} lineNumber 634 * @param {number} lineNumber
628 * @param {number} columnNumber 635 * @param {number} columnNumber
629 */ 636 */
630 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber) 637 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber)
631 { 638 {
632 this.uiSourceCode = uiSourceCode; 639 this.uiSourceCode = uiSourceCode;
633 this.lineNumber = lineNumber; 640 this.lineNumber = lineNumber;
634 this.columnNumber = columnNumber; 641 this.columnNumber = columnNumber;
635 } 642 }
(...skipping 13 matching lines...) Expand all
649 /** 656 /**
650 * @return {string} 657 * @return {string}
651 */ 658 */
652 id: function() 659 id: function()
653 { 660 {
654 return this.uiSourceCode.uri() + ":" + this.lineNumber + ":" + this.colu mnNumber; 661 return this.uiSourceCode.uri() + ":" + this.lineNumber + ":" + this.colu mnNumber;
655 }, 662 },
656 } 663 }
657 664
658 /** 665 /**
659 * @interface
660 */
661 WebInspector.RawLocation = function()
662 {
663 }
664
665 /**
666 * @constructor 666 * @constructor
667 * @param {!WebInspector.RawLocation} rawLocation 667 * @param {!WebInspector.RawLocation} rawLocation
668 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegat e 668 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegat e
669 */ 669 */
670 WebInspector.LiveLocation = function(rawLocation, updateDelegate) 670 WebInspector.LiveLocation = function(rawLocation, updateDelegate)
671 { 671 {
672 this._rawLocation = rawLocation; 672 this._rawLocation = rawLocation;
673 this._updateDelegate = updateDelegate; 673 this._updateDelegate = updateDelegate;
674 } 674 }
675 675
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 * @param {string} query 786 * @param {string} query
787 * @param {boolean} caseSensitive 787 * @param {boolean} caseSensitive
788 * @param {boolean} isRegex 788 * @param {boolean} isRegex
789 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback 789 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
790 */ 790 */
791 searchInContent: function(query, caseSensitive, isRegex, callback) 791 searchInContent: function(query, caseSensitive, isRegex, callback)
792 { 792 {
793 callback([]); 793 callback([]);
794 } 794 }
795 } 795 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/workspace/SearchConfig.js ('k') | Source/devtools/front_end/workspace/Workspace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698