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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 2782773002: [DevTools] Remove SDKModels' fromTarget methods (Closed)
Patch Set: addressed review comments Created 3 years, 8 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/sources/NavigatorView.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 702
703 var nodeIdsToResolve = new Set(); 703 var nodeIdsToResolve = new Set();
704 var timelineData = TimelineModel.TimelineData.forEvent(event); 704 var timelineData = TimelineModel.TimelineData.forEvent(event);
705 if (timelineData.backendNodeId) 705 if (timelineData.backendNodeId)
706 nodeIdsToResolve.add(timelineData.backendNodeId); 706 nodeIdsToResolve.add(timelineData.backendNodeId);
707 var invalidationTrackingEvents = TimelineModel.InvalidationTracker.invalidat ionEventsFor(event); 707 var invalidationTrackingEvents = TimelineModel.InvalidationTracker.invalidat ionEventsFor(event);
708 if (invalidationTrackingEvents) 708 if (invalidationTrackingEvents)
709 Timeline.TimelineUIUtils._collectInvalidationNodeIds(nodeIdsToResolve, inv alidationTrackingEvents); 709 Timeline.TimelineUIUtils._collectInvalidationNodeIds(nodeIdsToResolve, inv alidationTrackingEvents);
710 var relatedNodes = null; 710 var relatedNodes = null;
711 if (nodeIdsToResolve.size) { 711 if (nodeIdsToResolve.size) {
712 var domModel = SDK.DOMModel.fromTarget(target); 712 var domModel = target.model(SDK.DOMModel);
713 if (domModel) { 713 if (domModel) {
714 relatedNodes = await new Promise(fulfill => 714 relatedNodes = await new Promise(fulfill =>
715 domModel.pushNodesByBackendIdsToFrontend(nodeIdsToResolve, fulfill)) ; 715 domModel.pushNodesByBackendIdsToFrontend(nodeIdsToResolve, fulfill)) ;
716 } 716 }
717 } 717 }
718 718
719 return Timeline.TimelineUIUtils._buildTraceEventDetailsSynchronously( 719 return Timeline.TimelineUIUtils._buildTraceEventDetailsSynchronously(
720 event, model, linkifier, detailed, relatedNodes); 720 event, model, linkifier, detailed, relatedNodes);
721 } 721 }
722 722
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 * @param {string=} warningType 2286 * @param {string=} warningType
2287 */ 2287 */
2288 appendWarningRow(event, warningType) { 2288 appendWarningRow(event, warningType) {
2289 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); 2289 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType);
2290 if (warning) 2290 if (warning)
2291 this.appendElementRow(Common.UIString('Warning'), warning, true); 2291 this.appendElementRow(Common.UIString('Warning'), warning, true);
2292 } 2292 }
2293 }; 2293 };
2294 2294
2295 Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol = Symbol('categoryBreakdo wnCache'); 2295 Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol = Symbol('categoryBreakdo wnCache');
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698