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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 1416793005: Devtools: API To set the red/yellow squiggles for a file via DI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index cb766c7dfbfc0ab14ea87b16bc274d9ab365722f..f55af86751d00f1b4cdc201a11faa0abbef898d2 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -1359,6 +1359,36 @@ WebInspector.SourcesPanel.RevealingActionDelegate.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 instanceof WebInspector.UISourceCodeMessages))
+ return Promise.reject(new Error("Internal error: container not a WebInspector.UISourceCodeMessages"));
+
+ var frame = WebInspector.SourcesPanel.instance().sourcesView().viewForFile(container.source());
+ frame.setMessagesForSource(container.messages().map(function(m){
pfeldman 2015/10/26 18:08:49 Revealer is for revealing, not for providing messa
wes 2015/10/26 22:16:32 Acknowledged.
+ return new WebInspector.SourceFrameMessage(m.text(), WebInspector.SourceFrameMessage.Level[m.kind()], m.location());
+ }));
+
+ return Promise.resolve();
+ }
+}
+
/**
* @constructor
* @implements {WebInspector.ActionDelegate}

Powered by Google App Engine
This is Rietveld 408576698