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

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

Issue 14672033: DevTools: Make snippets renaming work through SnippetsProjectDelegate. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 years, 7 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/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.js
diff --git a/Source/devtools/front_end/Workspace.js b/Source/devtools/front_end/Workspace.js
index 64aaf804e4591b0ee93f11e9ca41b6874f520297..ad3c96a676dd033cb10f62c54b8255ad3c6f267c 100644
--- a/Source/devtools/front_end/Workspace.js
+++ b/Source/devtools/front_end/Workspace.js
@@ -113,6 +113,18 @@ WebInspector.ProjectDelegate.prototype = {
setFileContent: function(path, newContent, callback) { },
/**
+ * @return {boolean}
+ */
+ canRename: function() { },
+
+ /**
+ * @param {Array.<string>} path
+ * @param {string} newName
+ * @param {function(boolean, string=)} callback
+ */
+ rename: function(path, newName, callback) { },
+
+ /**
* @param {Array.<string>} path
* @param {string} query
* @param {boolean} caseSensitive
@@ -267,6 +279,24 @@ WebInspector.Project.prototype = {
},
/**
+ * @return {boolean}
+ */
+ canRename: function()
+ {
+ return this._projectDelegate.canRename();
+ },
+
+ /**
+ * @param {WebInspector.UISourceCode} uiSourceCode
+ * @param {string} newName
+ * @param {function(boolean, string=)} callback
+ */
+ rename: function(uiSourceCode, newName, callback)
+ {
+ this._projectDelegate.rename(uiSourceCode.path(), newName, callback);
+ },
+
+ /**
* @param {WebInspector.UISourceCode} uiSourceCode
* @param {string} query
* @param {boolean} caseSensitive
« no previous file with comments | « Source/devtools/front_end/UISourceCode.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698