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

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: Remove marker interfaces and WI.SourceMapping 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.PresentationConsoleMessage>} */ 53 /** @type {!Array.<!WebInspector.PresentationMessage>} */
54 this._consoleMessages = []; 54 this._consoleMessages = [];
55 55
56 /** @type {!Array.<!WebInspector.Revision>} */ 56 /** @type {!Array.<!WebInspector.Revision>} */
57 this.history = []; 57 this.history = [];
58 } 58 }
59 59
60 WebInspector.UISourceCode.Events = { 60 WebInspector.UISourceCode.Events = {
61 WorkingCopyChanged: "WorkingCopyChanged", 61 WorkingCopyChanged: "WorkingCopyChanged",
62 WorkingCopyCommitted: "WorkingCopyCommitted", 62 WorkingCopyCommitted: "WorkingCopyCommitted",
63 TitleChanged: "TitleChanged", 63 TitleChanged: "TitleChanged",
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 568
569 /** 569 /**
570 * @return {boolean} 570 * @return {boolean}
571 */ 571 */
572 contentLoaded: function() 572 contentLoaded: function()
573 { 573 {
574 return this._contentLoaded; 574 return this._contentLoaded;
575 }, 575 },
576 576
577 /** 577 /**
578 * @return {!Array.<!WebInspector.PresentationConsoleMessage>} 578 * @return {!Array.<!WebInspector.PresentationMessage>}
579 */ 579 */
580 consoleMessages: function() 580 consoleMessages: function()
581 { 581 {
582 return this._consoleMessages; 582 return this._consoleMessages;
583 }, 583 },
584 584
585 /** 585 /**
586 * @param {!WebInspector.PresentationConsoleMessage} message 586 * @param {!WebInspector.PresentationMessage} message
587 */ 587 */
588 consoleMessageAdded: function(message) 588 consoleMessageAdded: function(message)
589 { 589 {
590 this._consoleMessages.push(message); 590 this._consoleMessages.push(message);
591 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageAdded, message); 591 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageAdded, message);
592 }, 592 },
593 593
594 /** 594 /**
595 * @param {!WebInspector.PresentationConsoleMessage} message 595 * @param {!WebInspector.PresentationMessage} message
596 */ 596 */
597 consoleMessageRemoved: function(message) 597 consoleMessageRemoved: function(message)
598 { 598 {
599 this._consoleMessages.remove(message); 599 this._consoleMessages.remove(message);
600 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageRemoved, message); 600 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssageRemoved, message);
601 }, 601 },
602 602
603 consoleMessagesCleared: function() 603 consoleMessagesCleared: function()
604 { 604 {
605 this._consoleMessages = []; 605 this._consoleMessages = [];
606 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssagesCleared); 606 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ConsoleMe ssagesCleared);
607 }, 607 },
608 608
609 /** 609 /**
610 * @param {number} lineNumber 610 * @param {number} lineNumber
611 * @param {number=} columnNumber 611 * @param {number=} columnNumber
612 * @return {!WebInspector.UILocation} 612 * @return {!WebInspector.UILocation}
613 */ 613 */
614 uiLocation: function(lineNumber, columnNumber) 614 uiLocation: function(lineNumber, columnNumber)
615 { 615 {
616 if (typeof columnNumber === "undefined") 616 if (typeof columnNumber === "undefined")
617 columnNumber = 0; 617 columnNumber = 0;
618 return new WebInspector.UILocation(this, lineNumber, columnNumber); 618 return new WebInspector.UILocation(this, lineNumber, columnNumber);
619 }, 619 },
620 620
621 __proto__: WebInspector.Object.prototype 621 __proto__: WebInspector.Object.prototype
622 } 622 }
623 623
624 /** 624 /**
625 * @interface
626 */
627 WebInspector.PresentationMessage = function() {}
628
629 /**
625 * @constructor 630 * @constructor
626 * @param {!WebInspector.UISourceCode} uiSourceCode 631 * @param {!WebInspector.UISourceCode} uiSourceCode
627 * @param {number} lineNumber 632 * @param {number} lineNumber
628 * @param {number} columnNumber 633 * @param {number} columnNumber
629 */ 634 */
630 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber) 635 WebInspector.UILocation = function(uiSourceCode, lineNumber, columnNumber)
631 { 636 {
632 this.uiSourceCode = uiSourceCode; 637 this.uiSourceCode = uiSourceCode;
633 this.lineNumber = lineNumber; 638 this.lineNumber = lineNumber;
634 this.columnNumber = columnNumber; 639 this.columnNumber = columnNumber;
(...skipping 14 matching lines...) Expand all
649 /** 654 /**
650 * @return {string} 655 * @return {string}
651 */ 656 */
652 id: function() 657 id: function()
653 { 658 {
654 return this.uiSourceCode.uri() + ":" + this.lineNumber + ":" + this.colu mnNumber; 659 return this.uiSourceCode.uri() + ":" + this.lineNumber + ":" + this.colu mnNumber;
655 }, 660 },
656 } 661 }
657 662
658 /** 663 /**
659 * @interface
660 */
661 WebInspector.RawLocation = function()
662 {
663 }
664
665 /**
666 * @constructor
667 * @param {!WebInspector.RawLocation} rawLocation
668 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegat e
669 */
670 WebInspector.LiveLocation = function(rawLocation, updateDelegate)
671 {
672 this._rawLocation = rawLocation;
673 this._updateDelegate = updateDelegate;
674 }
675
676 WebInspector.LiveLocation.prototype = {
677 update: function()
678 {
679 var uiLocation = this.uiLocation();
680 if (!uiLocation)
681 return;
682 if (this._updateDelegate(uiLocation))
683 this.dispose();
684 },
685
686 /**
687 * @return {!WebInspector.RawLocation}
688 */
689 rawLocation: function()
690 {
691 return this._rawLocation;
692 },
693
694 /**
695 * @return {!WebInspector.UILocation}
696 */
697 uiLocation: function()
698 {
699 throw "Not implemented";
700 },
701
702 dispose: function()
703 {
704 // Overridden by subclasses.
705 }
706 }
707
708 /**
709 * @constructor 664 * @constructor
710 * @implements {WebInspector.ContentProvider} 665 * @implements {WebInspector.ContentProvider}
711 * @param {!WebInspector.UISourceCode} uiSourceCode 666 * @param {!WebInspector.UISourceCode} uiSourceCode
712 * @param {?string|undefined} content 667 * @param {?string|undefined} content
713 * @param {!Date} timestamp 668 * @param {!Date} timestamp
714 */ 669 */
715 WebInspector.Revision = function(uiSourceCode, content, timestamp) 670 WebInspector.Revision = function(uiSourceCode, content, timestamp)
716 { 671 {
717 this._uiSourceCode = uiSourceCode; 672 this._uiSourceCode = uiSourceCode;
718 this._content = content; 673 this._content = content;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 * @param {string} query 741 * @param {string} query
787 * @param {boolean} caseSensitive 742 * @param {boolean} caseSensitive
788 * @param {boolean} isRegex 743 * @param {boolean} isRegex
789 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback 744 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal lback
790 */ 745 */
791 searchInContent: function(query, caseSensitive, isRegex, callback) 746 searchInContent: function(query, caseSensitive, isRegex, callback)
792 { 747 {
793 callback([]); 748 callback([]);
794 } 749 }
795 } 750 }
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