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

Unified Diff: Source/devtools/front_end/sources/SourcesPanel.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
Index: Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/Source/devtools/front_end/sources/SourcesPanel.js b/Source/devtools/front_end/sources/SourcesPanel.js
index ccbaa3a1ee8f0c5f8955142eae6c568adab35a67..3588c810a79531e99503bc85e22f07fab1c4fb0d 100644
--- a/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/Source/devtools/front_end/sources/SourcesPanel.js
@@ -1369,6 +1369,44 @@ WebInspector.SourcesPanel.DebuggerPausedDetailsRevealer.prototype = {
}
}
+
+/**
+ * @constructor
+ * @implements {WebInspector.Revealer}
+ */
+WebInspector.SourcesPanel.LineMessageRevealer = function()
+{
+}
+
+WebInspector.SourcesPanel.LineMessageRevealer.prototype = {
+ /**
+ * @override
+ * @param {!Object} object
+ * @return {!Promise}
+ */
+ reveal: function(object)
+ {
+ var container = /** @type {!WebInspector.UISourceCodeMessages} */ (object);
+ if (!(container.messages() instanceof Array))
+ return Promise.reject(new Error("Internal error: messages member not an array of line message definition objects"));
+ if (!(container.source() instanceof WebInspector.UISourceCode))
+ return Promise.reject(new Error("Internal error: code member not a UISourceCode objects"));
+
+ var frame = WebInspector.SourcesPanel.instance().sourcesView().viewForFile(container.source());
+ frame.setMessagesForSource(container.messages().map(function(m){
+ return new WebInspector.SourceFrameMessage(m.text(), WebInspector.SourceFrameMessage.Level[m.kind()], {
+ line: m.location().startLine,
+ column: m.location().startColumn
+ }, {
+ line: m.location().endLine,
+ column: m.location().endColumn
+ });
+ }));
+
+ return Promise.resolve();
+ }
+}
+
/**
* @constructor
* @implements {WebInspector.ActionDelegate}
« no previous file with comments | « Source/devtools/front_end/sources/JavaScriptSourceFrame.js ('k') | Source/devtools/front_end/sources/SourcesView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698