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

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

Issue 1314853006: DevTools: expose wired front-end API for editors interop [blink] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « Source/devtools/front_end/workspace/UISourceCode.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 this._fileSystemMapping = fileSystemMapping; 567 this._fileSystemMapping = fileSystemMapping;
568 /** @type {!Object.<string, !WebInspector.Project>} */ 568 /** @type {!Object.<string, !WebInspector.Project>} */
569 this._projects = {}; 569 this._projects = {};
570 this._hasResourceContentTrackingExtensions = false; 570 this._hasResourceContentTrackingExtensions = false;
571 } 571 }
572 572
573 WebInspector.Workspace.Events = { 573 WebInspector.Workspace.Events = {
574 UISourceCodeAdded: "UISourceCodeAdded", 574 UISourceCodeAdded: "UISourceCodeAdded",
575 UISourceCodeRemoved: "UISourceCodeRemoved", 575 UISourceCodeRemoved: "UISourceCodeRemoved",
576 UISourceCodeContentCommitted: "UISourceCodeContentCommitted", 576 UISourceCodeContentCommitted: "UISourceCodeContentCommitted",
577 UISourceCodeWorkingCopyChanged: "UISourceCodeWorkingCopyChanged",
577 ProjectAdded: "ProjectAdded", 578 ProjectAdded: "ProjectAdded",
578 ProjectRemoved: "ProjectRemoved" 579 ProjectRemoved: "ProjectRemoved"
579 } 580 }
580 581
581 WebInspector.Workspace.prototype = { 582 WebInspector.Workspace.prototype = {
582 /** 583 /**
583 * @return {!Array.<!WebInspector.UISourceCode>} 584 * @return {!Array.<!WebInspector.UISourceCode>}
584 */ 585 */
585 unsavedSourceCodes: function() 586 unsavedSourceCodes: function()
586 { 587 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 for (var i = 0; i < projects.length; ++i) { 624 for (var i = 0; i < projects.length; ++i) {
624 var project = projects[i]; 625 var project = projects[i];
625 var uiSourceCode = project.uiSourceCodeForOriginURL(originURL); 626 var uiSourceCode = project.uiSourceCodeForOriginURL(originURL);
626 if (uiSourceCode) 627 if (uiSourceCode)
627 return uiSourceCode; 628 return uiSourceCode;
628 } 629 }
629 return null; 630 return null;
630 }, 631 },
631 632
632 /** 633 /**
634 * @param {string} originURL
635 * @return {?WebInspector.UISourceCode}
636 */
637 filesystemUISourceCode: function(originURL)
638 {
639 var projects = this.projectsForType(WebInspector.projectTypes.FileSystem );
640 for (var i = 0; i < projects.length; ++i) {
641 var project = projects[i];
642 var uiSourceCode = project.uiSourceCodeForOriginURL(originURL);
643 if (uiSourceCode)
644 return uiSourceCode;
645 }
646 return null;
647 },
648
649 /**
633 * @param {string} type 650 * @param {string} type
634 * @return {!Array.<!WebInspector.UISourceCode>} 651 * @return {!Array.<!WebInspector.UISourceCode>}
635 */ 652 */
636 uiSourceCodesForProjectType: function(type) 653 uiSourceCodesForProjectType: function(type)
637 { 654 {
638 var result = []; 655 var result = [];
639 for (var projectName in this._projects) { 656 for (var projectName in this._projects) {
640 var project = this._projects[projectName]; 657 var project = this._projects[projectName];
641 if (project.type() === type) 658 if (project.type() === type)
642 result = result.concat(project.uiSourceCodes()); 659 result = result.concat(project.uiSourceCodes());
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 return this._hasResourceContentTrackingExtensions; 745 return this._hasResourceContentTrackingExtensions;
729 }, 746 },
730 747
731 __proto__: WebInspector.Object.prototype 748 __proto__: WebInspector.Object.prototype
732 } 749 }
733 750
734 /** 751 /**
735 * @type {!WebInspector.Workspace} 752 * @type {!WebInspector.Workspace}
736 */ 753 */
737 WebInspector.workspace; 754 WebInspector.workspace;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/workspace/UISourceCode.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698