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

Side by Side Diff: Source/devtools/front_end/CPUProfileView.js

Issue 212593009: FlameChart: move CPUProfiler related part of the FlameChart into a separate file. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: missed file was added. test was fixed. Created 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 380
381 var profileNode = searchResult.profileNode; 381 var profileNode = searchResult.profileNode;
382 profileNode.revealAndSelect(); 382 profileNode.revealAndSelect();
383 }, 383 },
384 384
385 _ensureFlameChartCreated: function() 385 _ensureFlameChartCreated: function()
386 { 386 {
387 if (this._flameChart) 387 if (this._flameChart)
388 return; 388 return;
389 this._dataProvider = new WebInspector.CPUFlameChartDataProvider(this); 389 this._dataProvider = new WebInspector.CPUFlameChartDataProvider(this);
390 this._flameChart = new WebInspector.FlameChart(this._dataProvider); 390 this._flameChart = new WebInspector.CPUProfileFlameChart(this._dataProvi der);
391 this._flameChart.addEventListener(WebInspector.FlameChart.Events.EntrySe lected, this._onEntrySelected.bind(this)); 391 this._flameChart.addEventListener(WebInspector.FlameChart.Events.EntrySe lected, this._onEntrySelected.bind(this));
392 }, 392 },
393 393
394 /** 394 /**
395 * @param {!WebInspector.Event} event 395 * @param {!WebInspector.Event} event
396 */ 396 */
397 _onEntrySelected: function(event) 397 _onEntrySelected: function(event)
398 { 398 {
399 var entryIndex = event.data; 399 var entryIndex = event.data;
400 var node = this._dataProvider._entryNodes[entryIndex]; 400 var node = this._dataProvider._entryNodes[entryIndex];
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 if (this._onTempFileReady) { 1024 if (this._onTempFileReady) {
1025 this._onTempFileReady(); 1025 this._onTempFileReady();
1026 this._onTempFileReady = null; 1026 this._onTempFileReady = null;
1027 } 1027 }
1028 }, 1028 },
1029 1029
1030 __proto__: WebInspector.ProfileHeader.prototype 1030 __proto__: WebInspector.ProfileHeader.prototype
1031 } 1031 }
1032 1032
1033 /** 1033 /**
1034 * @return {!WebInspector.FlameChart.ColorGenerator} 1034 * @return {!WebInspector.CPUProfileFlameChart.ColorGenerator}
1035 */ 1035 */
1036 WebInspector.CPUProfileView.colorGenerator = function() 1036 WebInspector.CPUProfileView.colorGenerator = function()
1037 { 1037 {
1038 if (!WebInspector.CPUProfileView._colorGenerator) { 1038 if (!WebInspector.CPUProfileView._colorGenerator) {
1039 var colorGenerator = new WebInspector.FlameChart.ColorGenerator(); 1039 var colorGenerator = new WebInspector.CPUProfileFlameChart.ColorGenerato r();
1040 colorGenerator.colorForID("(idle)::0", 50); 1040 colorGenerator.colorForID("(idle)::0", 50);
1041 colorGenerator.colorForID("(program)::0", 50); 1041 colorGenerator.colorForID("(program)::0", 50);
1042 colorGenerator.colorForID("(garbage collector)::0", 50); 1042 colorGenerator.colorForID("(garbage collector)::0", 50);
1043 WebInspector.CPUProfileView._colorGenerator = colorGenerator; 1043 WebInspector.CPUProfileView._colorGenerator = colorGenerator;
1044 } 1044 }
1045 return WebInspector.CPUProfileView._colorGenerator; 1045 return WebInspector.CPUProfileView._colorGenerator;
1046 } 1046 }
1047 1047
1048 /** 1048 /**
1049 * @constructor 1049 * @constructor
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 1385
1386 /** 1386 /**
1387 * @param {number} entryIndex 1387 * @param {number} entryIndex
1388 * @return {!string} 1388 * @return {!string}
1389 */ 1389 */
1390 textColor: function(entryIndex) 1390 textColor: function(entryIndex)
1391 { 1391 {
1392 return "#333"; 1392 return "#333";
1393 } 1393 }
1394 } 1394 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/CPUProfileFlameChart.js ('k') | Source/devtools/front_end/FlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698