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

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

Issue 2752403002: [DevTools] Migrate usages of Target to RuntimeModel where makes sense (Closed)
Patch Set: review comments addressed Created 3 years, 9 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/SourcesPanel.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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 return detailsText; 545 return detailsText;
546 546
547 /** 547 /**
548 * @param {string} scriptId 548 * @param {string} scriptId
549 * @param {number} lineNumber 549 * @param {number} lineNumber
550 * @param {number} columnNumber 550 * @param {number} columnNumber
551 * @return {?string} 551 * @return {?string}
552 */ 552 */
553 function linkifyLocationAsText(scriptId, lineNumber, columnNumber) { 553 function linkifyLocationAsText(scriptId, lineNumber, columnNumber) {
554 var debuggerModel = SDK.DebuggerModel.fromTarget(target); 554 var debuggerModel = target ? target.model(SDK.DebuggerModel) : null;
555 if (!target || target.isDisposed() || !scriptId || !debuggerModel) 555 if (!target || target.isDisposed() || !scriptId || !debuggerModel)
556 return null; 556 return null;
557 var rawLocation = debuggerModel.createRawLocationByScriptId(scriptId, line Number, columnNumber); 557 var rawLocation = debuggerModel.createRawLocationByScriptId(scriptId, line Number, columnNumber);
558 if (!rawLocation) 558 if (!rawLocation)
559 return null; 559 return null;
560 var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation (rawLocation); 560 var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation (rawLocation);
561 return uiLocation.linkText(); 561 return uiLocation.linkText();
562 } 562 }
563 563
564 /** 564 /**
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
2300 * @param {string=} warningType 2300 * @param {string=} warningType
2301 */ 2301 */
2302 appendWarningRow(event, warningType) { 2302 appendWarningRow(event, warningType) {
2303 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType); 2303 var warning = Timeline.TimelineUIUtils.eventWarning(event, warningType);
2304 if (warning) 2304 if (warning)
2305 this.appendElementRow(Common.UIString('Warning'), warning, true); 2305 this.appendElementRow(Common.UIString('Warning'), warning, true);
2306 } 2306 }
2307 }; 2307 };
2308 2308
2309 Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol = Symbol('categoryBreakdo wnCache'); 2309 Timeline.TimelineUIUtils._categoryBreakdownCacheSymbol = Symbol('categoryBreakdo wnCache');
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698