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} |