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

Unified Diff: Source/devtools/front_end/workspace/UISourceCode.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/ui/suggestBox.css ('k') | Source/devtools/front_end/workspace/Workspace.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/workspace/UISourceCode.js
diff --git a/Source/devtools/front_end/workspace/UISourceCode.js b/Source/devtools/front_end/workspace/UISourceCode.js
index 1b374623fc42f589f914df608d9aaf80055a6e1d..3d3e8c3c155378cc409f77af13ef8d15e58d5d9d 100644
--- a/Source/devtools/front_end/workspace/UISourceCode.js
+++ b/Source/devtools/front_end/workspace/UISourceCode.js
@@ -520,12 +520,7 @@ WebInspector.UISourceCode.prototype = {
*/
extension: function()
{
- var lastIndexOfDot = this._name.lastIndexOf(".");
- var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot + 1) : "";
- var indexOfQuestionMark = extension.indexOf("?");
- if (indexOfQuestionMark !== -1)
- extension = extension.substr(0, indexOfQuestionMark);
- return extension;
+ return WebInspector.TextUtils.extension(this._name);
},
/**
@@ -726,3 +721,65 @@ WebInspector.Revision.prototype = {
callback([]);
}
}
+
+/**
+ * @constructor
+ * @param {string} text
+ * @param {string} kind
+ * @param {{startLine: number, startColumn: number, endLine: number, endColumn: number}} location
+ */
+WebInspector.UISourceCodeMessage = function(text, kind, location) {
+ this._text = text;
+ this._kind = kind;
+ this._location = location;
+}
+
+WebInspector.UISourceCodeMessage.prototype = {
+ /**
+ * @return {string}
+ */
+ text: function() {
+ return this._text;
+ },
+
+ /**
+ * @return {string}
+ */
+ kind: function() {
+ return this._kind;
+ },
+
+ /**
+ * @return {{startLine: number, startColumn: number, endLine: number, endColumn: number}}
+ */
+ location: function() {
+ return this._location;
+ }
+}
+
+/**
+ * @constructor
+ * @param {!WebInspector.UISourceCode} source
+ * @param {!Array<!WebInspector.UISourceCodeMessage>} messages
+ */
+WebInspector.UISourceCodeMessages = function(source, messages)
+{
+ this._source = source;
+ this._messages = messages;
+}
+
+WebInspector.UISourceCodeMessages.prototype = {
+ /**
+ * @return {!WebInspector.UISourceCode}
+ */
+ source: function() {
+ return this._source;
+ },
+
+ /**
+ * @return {!Array<!WebInspector.UISourceCodeMessage>}
+ */
+ messages: function() {
+ return this._messages;
+ }
+}
« no previous file with comments | « Source/devtools/front_end/ui/suggestBox.css ('k') | Source/devtools/front_end/workspace/Workspace.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698