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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline_model/TimelineModel.js

Issue 2378843003: Timeline: fix screenshots for headless shell (Closed)
Patch Set: review comments addressed Created 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 this._mainThreadEvents.splice(this._mainThreadEvents.lowerBound(firstPai ntEvent, WebInspector.TracingModel.Event.compareStartTime), 0, firstPaintEvent); 628 this._mainThreadEvents.splice(this._mainThreadEvents.lowerBound(firstPai ntEvent, WebInspector.TracingModel.Event.compareStartTime), 0, firstPaintEvent);
629 var firstPaintRecord = new WebInspector.TimelineModel.Record(firstPaintE vent); 629 var firstPaintRecord = new WebInspector.TimelineModel.Record(firstPaintE vent);
630 this._eventDividerRecords.splice(this._eventDividerRecords.lowerBound(fi rstPaintRecord, WebInspector.TimelineModel.Record._compareStartTime), 0, firstPa intRecord); 630 this._eventDividerRecords.splice(this._eventDividerRecords.lowerBound(fi rstPaintRecord, WebInspector.TimelineModel.Record._compareStartTime), 0, firstPa intRecord);
631 }, 631 },
632 632
633 /** 633 /**
634 * @param {!WebInspector.TracingModel} tracingModel 634 * @param {!WebInspector.TracingModel} tracingModel
635 */ 635 */
636 _processBrowserEvents: function(tracingModel) 636 _processBrowserEvents: function(tracingModel)
637 { 637 {
638 var browserMain = tracingModel.threadByName("Browser", "CrBrowserMain"); 638 var browserMain = WebInspector.TracingModel.browserMainThread(tracingMod el);
639 if (!browserMain) 639 if (!browserMain)
640 return; 640 return;
641
641 // Disregard regular events, we don't need them yet, but still process t o get proper metadata. 642 // Disregard regular events, we don't need them yet, but still process t o get proper metadata.
642 browserMain.events().forEach(this._processBrowserEvent, this); 643 browserMain.events().forEach(this._processBrowserEvent, this);
643 /** @type {!Map<!WebInspector.TimelineModel.AsyncEventGroup, !Array<!Web Inspector.TracingModel.AsyncEvent>>} */ 644 /** @type {!Map<!WebInspector.TimelineModel.AsyncEventGroup, !Array<!Web Inspector.TracingModel.AsyncEvent>>} */
644 var asyncEventsByGroup = new Map(); 645 var asyncEventsByGroup = new Map();
645 this._processAsyncEvents(asyncEventsByGroup, browserMain.asyncEvents()); 646 this._processAsyncEvents(asyncEventsByGroup, browserMain.asyncEvents());
646 this._mergeAsyncEvents(this._mainThreadAsyncEventsByGroup, asyncEventsBy Group); 647 this._mergeAsyncEvents(this._mainThreadAsyncEventsByGroup, asyncEventsBy Group);
647 }, 648 },
648 649
649 _buildTimelineRecords: function() 650 _buildTimelineRecords: function()
650 { 651 {
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 if (!id) 1788 if (!id)
1788 return; 1789 return;
1789 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */ 1790 /** @type {!Map<string, !WebInspector.TracingModel.Event>|undefined} */
1790 var initiatorMap = this._initiatorByType.get(initiatorType); 1791 var initiatorMap = this._initiatorByType.get(initiatorType);
1791 if (isInitiator) 1792 if (isInitiator)
1792 initiatorMap.set(id, event); 1793 initiatorMap.set(id, event);
1793 else 1794 else
1794 event.initiator = initiatorMap.get(id) || null; 1795 event.initiator = initiatorMap.get(id) || null;
1795 } 1796 }
1796 } 1797 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/TracingModel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698