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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileFlameChart.js

Issue 2466123002: DevTools: reformat front-end code to match chromium style. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 /** 1 /**
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 this._mainPane = new WebInspector.FlameChart(dataProvider, this._overviewPan e); 269 this._mainPane = new WebInspector.FlameChart(dataProvider, this._overviewPan e);
270 this._mainPane.show(this.element); 270 this._mainPane.show(this.element);
271 this._mainPane.addEventListener(WebInspector.FlameChart.Events.EntrySelected , this._onEntrySelected, this); 271 this._mainPane.addEventListener(WebInspector.FlameChart.Events.EntrySelected , this._onEntrySelected, this);
272 this._overviewPane.addEventListener(WebInspector.OverviewGrid.Events.WindowC hanged, this._onWindowChanged, this); 272 this._overviewPane.addEventListener(WebInspector.OverviewGrid.Events.WindowC hanged, this._onWindowChanged, this);
273 this._dataProvider = dataProvider; 273 this._dataProvider = dataProvider;
274 this._searchResults = []; 274 this._searchResults = [];
275 }; 275 };
276 276
277 WebInspector.CPUProfileFlameChart.prototype = { 277 WebInspector.CPUProfileFlameChart.prototype = {
278 /**
279 * @override
280 */
278 focus: function() 281 focus: function()
279 { 282 {
280 this._mainPane.focus(); 283 this._mainPane.focus();
281 }, 284 },
282 285
283 /** 286 /**
284 * @param {!WebInspector.Event} event 287 * @param {!WebInspector.Event} event
285 */ 288 */
286 _onWindowChanged: function(event) 289 _onWindowChanged: function(event)
287 { 290 {
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 }, 551 },
549 552
550 /** 553 /**
551 * @return {?WebInspector.FlameChart.TimelineData} 554 * @return {?WebInspector.FlameChart.TimelineData}
552 */ 555 */
553 _timelineData: function() 556 _timelineData: function()
554 { 557 {
555 return this._dataProvider.timelineData(); 558 return this._dataProvider.timelineData();
556 }, 559 },
557 560
561 /**
562 * @override
563 */
558 onResize: function() 564 onResize: function()
559 { 565 {
560 this._scheduleUpdate(); 566 this._scheduleUpdate();
561 }, 567 },
562 568
563 _scheduleUpdate: function() 569 _scheduleUpdate: function()
564 { 570 {
565 if (this._updateTimerId) 571 if (this._updateTimerId)
566 return; 572 return;
567 this._updateTimerId = this.element.window().requestAnimationFrame(this.u pdate.bind(this)); 573 this._updateTimerId = this.element.window().requestAnimationFrame(this.u pdate.bind(this));
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 { 647 {
642 var ratio = window.devicePixelRatio; 648 var ratio = window.devicePixelRatio;
643 this._overviewCanvas.width = width * ratio; 649 this._overviewCanvas.width = width * ratio;
644 this._overviewCanvas.height = height * ratio; 650 this._overviewCanvas.height = height * ratio;
645 this._overviewCanvas.style.width = width + "px"; 651 this._overviewCanvas.style.width = width + "px";
646 this._overviewCanvas.style.height = height + "px"; 652 this._overviewCanvas.style.height = height + "px";
647 }, 653 },
648 654
649 __proto__: WebInspector.VBox.prototype 655 __proto__: WebInspector.VBox.prototype
650 }; 656 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698