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

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

Issue 1959783002: DevTools: Introduce device dependent CPU throttling rates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | 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) 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 * @this {WebInspector.TimelinePanel} 413 * @this {WebInspector.TimelinePanel}
414 */ 414 */
415 function addGroupingOption(name, value) 415 function addGroupingOption(name, value)
416 { 416 {
417 var option = this._cpuThrottlingCombobox.createOption(name, "", String(value)); 417 var option = this._cpuThrottlingCombobox.createOption(name, "", String(value));
418 this._cpuThrottlingCombobox.addOption(option); 418 this._cpuThrottlingCombobox.addOption(option);
419 if (value === this._cpuThrottlingManager.rate()) 419 if (value === this._cpuThrottlingManager.rate())
420 this._cpuThrottlingCombobox.select(option); 420 this._cpuThrottlingCombobox.select(option);
421 } 421 }
422 addGroupingOption.call(this, WebInspector.UIString("No CPU throttlin g"), 1); 422 addGroupingOption.call(this, WebInspector.UIString("No CPU throttlin g"), 1);
423 for (var rate of [1.2, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 50]) 423 addGroupingOption.call(this, WebInspector.UIString("High end device\ u2003(2x slowdown)"), 2);
424 addGroupingOption.call(this, WebInspector.UIString("%fx slowdown ", rate), rate); 424 addGroupingOption.call(this, WebInspector.UIString("Low end device\u 2003(5x slowdown)"), 5);
425 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox); 425 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox);
426 } 426 }
427 }, 427 },
428 428
429 _prepareToLoadTimeline: function() 429 _prepareToLoadTimeline: function()
430 { 430 {
431 console.assert(this._state === WebInspector.TimelinePanel.State.Idle); 431 console.assert(this._state === WebInspector.TimelinePanel.State.Idle);
432 this._setState(WebInspector.TimelinePanel.State.Loading); 432 this._setState(WebInspector.TimelinePanel.State.Loading);
433 }, 433 },
434 434
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 * @override 2064 * @override
2065 * @param {!WebInspector.Target} target 2065 * @param {!WebInspector.Target} target
2066 */ 2066 */
2067 targetRemoved: function(target) 2067 targetRemoved: function(target)
2068 { 2068 {
2069 this._targets.remove(target, true); 2069 this._targets.remove(target, true);
2070 }, 2070 },
2071 2071
2072 __proto__: WebInspector.Object.prototype 2072 __proto__: WebInspector.Object.prototype
2073 } 2073 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698