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

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

Issue 23690005: Allow configuring CPU profiler sampling interval (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
« no previous file with comments | « Source/devtools/front_end/Settings.js ('k') | Source/devtools/protocol.json » ('j') | 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 * 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 for (var i = 0; i < options.length; ++i) { 258 for (var i = 0; i < options.length; ++i) {
259 var option = options[i]; 259 var option = options[i];
260 select.add(new Option(option[0], option[1])); 260 select.add(new Option(option[0], option[1]));
261 if (settingValue === option[1]) 261 if (settingValue === option[1])
262 select.selectedIndex = i; 262 select.selectedIndex = i;
263 } 263 }
264 264
265 function changeListener(e) 265 function changeListener(e)
266 { 266 {
267 setting.set(e.target.value); 267 // Don't use e.target.value to avoid conversion of the value to stri ng.
268 setting.set(options[select.selectedIndex][1]);
268 } 269 }
269 270
270 select.addEventListener("change", changeListener, false); 271 select.addEventListener("change", changeListener, false);
271 return p; 272 return p;
272 }, 273 },
273 274
274 /** 275 /**
275 * @param {string} label 276 * @param {string} label
276 * @param {WebInspector.Setting} setting 277 * @param {WebInspector.Setting} setting
277 * @param {boolean} numeric 278 * @param {boolean} numeric
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.s ettings.skipStackFramesSwitch); 406 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.s ettings.skipStackFramesSwitch);
406 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Pat tern"), WebInspector.settings.skipStackFramesPattern, false, 1000, "100px", WebI nspector.SettingsScreen.regexValidator)); 407 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Pat tern"), WebInspector.settings.skipStackFramesPattern, false, 1000, "100px", WebI nspector.SettingsScreen.regexValidator));
407 checkbox.appendChild(fieldset); 408 checkbox.appendChild(fieldset);
408 p.appendChild(checkbox); 409 p.appendChild(checkbox);
409 } 410 }
410 WebInspector.settings.skipStackFramesSwitch.addChangeListener(this._skipStac kFramesSwitchOrPatternChanged, this); 411 WebInspector.settings.skipStackFramesSwitch.addChangeListener(this._skipStac kFramesSwitchOrPatternChanged, this);
411 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._skipSta ckFramesSwitchOrPatternChanged, this); 412 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._skipSta ckFramesSwitchOrPatternChanged, this);
412 413
413 p = this._appendSection(WebInspector.UIString("Profiler")); 414 p = this._appendSection(WebInspector.UIString("Profiler"));
414 p.appendChild(WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UI String("Show advanced heap snapshot properties"), WebInspector.settings.showAdva ncedHeapSnapshotProperties)); 415 p.appendChild(WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UI String("Show advanced heap snapshot properties"), WebInspector.settings.showAdva ncedHeapSnapshotProperties));
416 p.appendChild(WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UI String("High resolution CPU profiling"), WebInspector.settings.highResolutionCpu Profiling));
415 417
416 p = this._appendSection(WebInspector.UIString("Timeline")); 418 p = this._appendSection(WebInspector.UIString("Timeline"));
417 checkbox = WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIStr ing("Limit number of captured JS stack frames"), WebInspector.settings.timelineL imitStackFramesFlag); 419 checkbox = WebInspector.SettingsTab.createSettingCheckbox(WebInspector.UIStr ing("Limit number of captured JS stack frames"), WebInspector.settings.timelineL imitStackFramesFlag);
418 p.appendChild(checkbox); 420 p.appendChild(checkbox);
419 421
420 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.setti ngs.timelineLimitStackFramesFlag); 422 fieldset = WebInspector.SettingsTab.createSettingFieldset(WebInspector.setti ngs.timelineLimitStackFramesFlag);
421 var frameCountValidator = WebInspector.SettingsScreen.integerValidator.bind( this, 0, 99); 423 var frameCountValidator = WebInspector.SettingsScreen.integerValidator.bind( this, 0, 99);
422 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Frames to capture"), WebInspector.settings.timelineStackFramesToCapture, true, 2, "2em" , frameCountValidator)); 424 fieldset.appendChild(this._createInputSetting(WebInspector.UIString("Frames to capture"), WebInspector.settings.timelineStackFramesToCapture, true, 2, "2em" , frameCountValidator));
423 checkbox.appendChild(fieldset); 425 checkbox.appendChild(fieldset);
424 426
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 var columns = this.columns(); 1226 var columns = this.columns();
1225 for (var i = 0; i < columns.length; ++i) { 1227 for (var i = 0; i < columns.length; ++i) {
1226 var columnId = columns[i]; 1228 var columnId = columns[i];
1227 var inputElement = this._addInputElements[columnId]; 1229 var inputElement = this._addInputElements[columnId];
1228 inputElement.value = ""; 1230 inputElement.value = "";
1229 } 1231 }
1230 }, 1232 },
1231 1233
1232 __proto__: WebInspector.SettingsList.prototype 1234 __proto__: WebInspector.SettingsList.prototype
1233 } 1235 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/Settings.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698