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

Unified Diff: Source/devtools/front_end/workspace/Workspace.js

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small cleanups - prefer URIs to contentURLs, revert protocol unifications, remove lambdas Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/workspace/UISourceCode.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/workspace/Workspace.js
diff --git a/Source/devtools/front_end/workspace/Workspace.js b/Source/devtools/front_end/workspace/Workspace.js
index 1ee582eb65a3318aeb973e6989d73da437c11842..53f48e02796205635cc73b4c0fbaa97a6f948a12 100644
--- a/Source/devtools/front_end/workspace/Workspace.js
+++ b/Source/devtools/front_end/workspace/Workspace.js
@@ -573,6 +573,7 @@ WebInspector.Workspace = function(fileSystemMapping)
WebInspector.Workspace.Events = {
UISourceCodeAdded: "UISourceCodeAdded",
UISourceCodeRemoved: "UISourceCodeRemoved",
+ UISourceCodeEdited: "UISourceCodeEdited",
UISourceCodeContentCommitted: "UISourceCodeContentCommitted",
ProjectAdded: "ProjectAdded",
ProjectRemoved: "ProjectRemoved"
@@ -630,6 +631,20 @@ WebInspector.Workspace.prototype = {
},
/**
+ * @param {string} url
+ * @return {?WebInspector.UISourceCode}
+ */
+ uiSourceCodeForFilePath: function(url) {
+ var items = this.uiSourceCodesForProjectType(WebInspector.projectTypes.FileSystem);
+ for (var i = 0; i < items.length; ++i) {
+ var item = items[i];
+ if (item.uri() === url)
+ return item;
+ }
+ return null;
+ },
+
+ /**
* @param {string} type
* @return {!Array.<!WebInspector.UISourceCode>}
*/
« 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