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

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

Issue 2560043005: DevTools: Remove unused variables. Disallow unused variables with eslint (Closed)
Patch Set: Created 4 years 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 */ 417 */
418 function addGroupingOption(name, value) { 418 function addGroupingOption(name, value) {
419 var option = cpuThrottlingCombobox.createOption(name, '', String(value)); 419 var option = cpuThrottlingCombobox.createOption(name, '', String(value));
420 cpuThrottlingCombobox.addOption(option); 420 cpuThrottlingCombobox.addOption(option);
421 if (hasSelection || (value && value !== currentRate)) 421 if (hasSelection || (value && value !== currentRate))
422 return; 422 return;
423 cpuThrottlingCombobox.select(option); 423 cpuThrottlingCombobox.select(option);
424 hasSelection = true; 424 hasSelection = true;
425 } 425 }
426 var predefinedRates = new Map([ 426 var predefinedRates = new Map([
427 [1, Common.UIString('No CPU throttling')], 427 [1, Common.UIString('No CPU throttling')], [2, Common.UIString('2\xD7 slow down')],
428 [2, Common.UIString('2\xD7 slowdown')], 428 [5, Common.UIString('5\xD7 slowdown')], [10, Common.UIString('10\xD7 slowd own')],
429 [5, Common.UIString('5\xD7 slowdown')],
430 [10, Common.UIString('10\xD7 slowdown')],
431 [20, Common.UIString('20\xD7 slowdown')] 429 [20, Common.UIString('20\xD7 slowdown')]
432 ]); 430 ]);
433 for (var rate of predefinedRates) 431 for (var rate of predefinedRates)
434 addGroupingOption(rate[1], rate[0]); 432 addGroupingOption(rate[1], rate[0]);
435 } 433 }
436 434
437 _prepareToLoadTimeline() { 435 _prepareToLoadTimeline() {
438 console.assert(this._state === Timeline.TimelinePanel.State.Idle); 436 console.assert(this._state === Timeline.TimelinePanel.State.Idle);
439 this._setState(Timeline.TimelinePanel.State.Loading); 437 this._setState(Timeline.TimelinePanel.State.Loading);
440 } 438 }
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 this._revealTimeRange(frame.startTime, frame.endTime); 1055 this._revealTimeRange(frame.startTime, frame.endTime);
1058 this.select(Timeline.TimelineSelection.fromFrame(frame)); 1056 this.select(Timeline.TimelineSelection.fromFrame(frame));
1059 return true; 1057 return true;
1060 } 1058 }
1061 1059
1062 /** 1060 /**
1063 * @param {!SDK.PaintProfilerSnapshot} snapshot 1061 * @param {!SDK.PaintProfilerSnapshot} snapshot
1064 */ 1062 */
1065 _showSnapshotInPaintProfiler(snapshot) { 1063 _showSnapshotInPaintProfiler(snapshot) {
1066 var paintProfilerView = this._paintProfilerView(); 1064 var paintProfilerView = this._paintProfilerView();
1067 var hasProfileData = paintProfilerView.setSnapshot(snapshot); 1065 paintProfilerView.setSnapshot(snapshot);
1068 if (!this._detailsView.hasTab(Timeline.TimelinePanel.DetailsTab.PaintProfile r)) { 1066 if (!this._detailsView.hasTab(Timeline.TimelinePanel.DetailsTab.PaintProfile r)) {
1069 this._detailsView.appendTab( 1067 this._detailsView.appendTab(
1070 Timeline.TimelinePanel.DetailsTab.PaintProfiler, Common.UIString('Pain t Profiler'), paintProfilerView, 1068 Timeline.TimelinePanel.DetailsTab.PaintProfiler, Common.UIString('Pain t Profiler'), paintProfilerView,
1071 undefined, undefined, true); 1069 undefined, undefined, true);
1072 } 1070 }
1073 this._detailsView.selectTab(Timeline.TimelinePanel.DetailsTab.PaintProfiler, true); 1071 this._detailsView.selectTab(Timeline.TimelinePanel.DetailsTab.PaintProfiler, true);
1074 } 1072 }
1075 1073
1076 /** 1074 /**
1077 * @param {!SDK.TracingModel.Event} event 1075 * @param {!SDK.TracingModel.Event} event
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 } 1955 }
1958 1956
1959 /** 1957 /**
1960 * @override 1958 * @override
1961 * @param {!SDK.Target} target 1959 * @param {!SDK.Target} target
1962 */ 1960 */
1963 targetRemoved(target) { 1961 targetRemoved(target) {
1964 this._targets.remove(target, true); 1962 this._targets.remove(target, true);
1965 } 1963 }
1966 }; 1964 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698