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

Unified Diff: Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 1184383002: DevTools: adopt FilmStripModel to new screenshot recorder trace format (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 6 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/timeline/TimelineUIUtils.js
diff --git a/Source/devtools/front_end/timeline/TimelineUIUtils.js b/Source/devtools/front_end/timeline/TimelineUIUtils.js
index ffc4d1764e1a1aaf519096abe792c0b39b42bfb7..a4685a752baf0effb67e0976c9189d6a355d6c10 100644
--- a/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -1324,7 +1324,7 @@ WebInspector.TimelineUIUtils.generateDetailsContentForFrame = function(frameMode
var contentHelper = new WebInspector.TimelineDetailsContentHelper(null, null, null, true);
if (filmStripFrame) {
var filmStripPreview = createElementWithClass("img", "timeline-filmstrip-preview");
- filmStripPreview.src = "data:image/jpg;base64," + filmStripFrame.imageData;
+ filmStripFrame.imageDataPromise().then(onGotImageData.bind(null, filmStripPreview));
contentHelper.appendElementRow(WebInspector.UIString("Screenshot"), filmStripPreview);
filmStripPreview.addEventListener("click", filmStripClicked.bind(null, filmStripFrame), false);
}
@@ -1338,6 +1338,16 @@ WebInspector.TimelineUIUtils.generateDetailsContentForFrame = function(frameMode
}
/**
+ * @param {!Element} image
+ * @param {?string} data
+ */
+ function onGotImageData(image, data)
+ {
+ if (data)
+ image.src = "data:image/jpg;base64," + data;
+ }
+
+ /**
* @param {!WebInspector.FilmStripModel.Frame} filmStripFrame
*/
function filmStripClicked(filmStripFrame)

Powered by Google App Engine
This is Rietveld 408576698