| OLD | NEW |
| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 this._filters.push(new WebInspector.ExcludeTopLevelFilter()); | 58 this._filters.push(new WebInspector.ExcludeTopLevelFilter()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 // Create models. | 61 // Create models. |
| 62 this._tracingModelBackingStorage = new WebInspector.TempFileBackingStorage("
tracing"); | 62 this._tracingModelBackingStorage = new WebInspector.TempFileBackingStorage("
tracing"); |
| 63 this._tracingModel = new WebInspector.TracingModel(this._tracingModelBacking
Storage); | 63 this._tracingModel = new WebInspector.TracingModel(this._tracingModelBacking
Storage); |
| 64 this._model = new WebInspector.TimelineModel(WebInspector.TimelineUIUtils.vi
sibleEventsFilter()); | 64 this._model = new WebInspector.TimelineModel(WebInspector.TimelineUIUtils.vi
sibleEventsFilter()); |
| 65 this._frameModel = new WebInspector.TimelineFrameModel(event => WebInspector
.TimelineUIUtils.eventStyle(event).category.name); | 65 this._frameModel = new WebInspector.TimelineFrameModel(event => WebInspector
.TimelineUIUtils.eventStyle(event).category.name); |
| 66 this._irModel = new WebInspector.TimelineIRModel(); | 66 this._irModel = new WebInspector.TimelineIRModel(); |
| 67 | 67 |
| 68 if (Runtime.experiments.isEnabled("cpuThrottling")) | 68 this._cpuThrottlingManager = new WebInspector.CPUThrottlingManager(); |
| 69 this._cpuThrottlingManager = new WebInspector.CPUThrottlingManager(); | |
| 70 | 69 |
| 71 /** @type {!Array.<!WebInspector.TimelineModeView>} */ | 70 /** @type {!Array.<!WebInspector.TimelineModeView>} */ |
| 72 this._currentViews = []; | 71 this._currentViews = []; |
| 73 | 72 |
| 74 this._captureNetworkSetting = WebInspector.settings.createSetting("timelineC
aptureNetwork", false); | 73 this._captureNetworkSetting = WebInspector.settings.createSetting("timelineC
aptureNetwork", false); |
| 75 this._captureJSProfileSetting = WebInspector.settings.createSetting("timelin
eEnableJSSampling", true); | 74 this._captureJSProfileSetting = WebInspector.settings.createSetting("timelin
eEnableJSSampling", true); |
| 76 this._captureMemorySetting = WebInspector.settings.createSetting("timelineCa
ptureMemory", false); | 75 this._captureMemorySetting = WebInspector.settings.createSetting("timelineCa
ptureMemory", false); |
| 77 this._captureLayersAndPicturesSetting = WebInspector.settings.createSetting(
"timelineCaptureLayersAndPictures", false); | 76 this._captureLayersAndPicturesSetting = WebInspector.settings.createSetting(
"timelineCaptureLayersAndPictures", false); |
| 78 this._captureFilmStripSetting = WebInspector.settings.createSetting("timelin
eCaptureFilmStrip", false); | 77 this._captureFilmStripSetting = WebInspector.settings.createSetting("timelin
eCaptureFilmStrip", false); |
| 79 | 78 |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 396 |
| 398 this._captureNetworkSetting.addChangeListener(this._onNetworkChanged, th
is); | 397 this._captureNetworkSetting.addChangeListener(this._onNetworkChanged, th
is); |
| 399 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); | 398 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); |
| 400 this._captureFilmStripSetting.addChangeListener(this._onModeChanged, thi
s); | 399 this._captureFilmStripSetting.addChangeListener(this._onModeChanged, thi
s); |
| 401 | 400 |
| 402 this._panelToolbar.appendSeparator(); | 401 this._panelToolbar.appendSeparator(); |
| 403 var garbageCollectButton = new WebInspector.ToolbarButton(WebInspector.U
IString("Collect garbage"), "garbage-collect-toolbar-item"); | 402 var garbageCollectButton = new WebInspector.ToolbarButton(WebInspector.U
IString("Collect garbage"), "garbage-collect-toolbar-item"); |
| 404 garbageCollectButton.addEventListener("click", this._garbageCollectButto
nClicked, this); | 403 garbageCollectButton.addEventListener("click", this._garbageCollectButto
nClicked, this); |
| 405 this._panelToolbar.appendToolbarItem(garbageCollectButton); | 404 this._panelToolbar.appendToolbarItem(garbageCollectButton); |
| 406 | 405 |
| 407 if (Runtime.experiments.isEnabled("cpuThrottling")) { | 406 this._panelToolbar.appendSeparator(); |
| 408 this._panelToolbar.appendSeparator(); | 407 this._cpuThrottlingCombobox = new WebInspector.ToolbarComboBox(this._onC
PUThrottlingChanged.bind(this)); |
| 409 this._cpuThrottlingCombobox = new WebInspector.ToolbarComboBox(this.
_onCPUThrottlingChanged.bind(this)); | 408 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox); |
| 410 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox); | 409 this._populateCPUThrottingCombobox(); |
| 411 this._populateCPUThrottingCombobox(); | |
| 412 } | |
| 413 }, | 410 }, |
| 414 | 411 |
| 415 _populateCPUThrottingCombobox: function() | 412 _populateCPUThrottingCombobox: function() |
| 416 { | 413 { |
| 417 var cpuThrottlingCombobox = this._cpuThrottlingCombobox; | 414 var cpuThrottlingCombobox = this._cpuThrottlingCombobox; |
| 418 cpuThrottlingCombobox.removeOptions(); | 415 cpuThrottlingCombobox.removeOptions(); |
| 419 var currentRate = this._cpuThrottlingManager.rate(); | 416 var currentRate = this._cpuThrottlingManager.rate(); |
| 420 var hasSelection = false; | 417 var hasSelection = false; |
| 421 /** | 418 /** |
| 422 * @param {string} name | 419 * @param {string} name |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2119 _onKeyDown: function(event) | 2116 _onKeyDown: function(event) |
| 2120 { | 2117 { |
| 2121 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Enter.code) { | 2118 if (event.keyCode === WebInspector.KeyboardShortcut.Keys.Enter.code) { |
| 2122 event.preventDefault(); | 2119 event.preventDefault(); |
| 2123 this._apply(); | 2120 this._apply(); |
| 2124 } | 2121 } |
| 2125 }, | 2122 }, |
| 2126 | 2123 |
| 2127 __proto__: WebInspector.HBox.prototype | 2124 __proto__: WebInspector.HBox.prototype |
| 2128 } | 2125 } |
| OLD | NEW |