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

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: 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 744840b2163ed1523163b313ca26e4fbfa373916..5ac398088a8acf91f731da3f5c085d12867759c1 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)
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698