OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 this._setting = WebInspector.settings.createSetting("experiments", {}); | 287 this._setting = WebInspector.settings.createSetting("experiments", {}); |
288 this._experiments = []; | 288 this._experiments = []; |
289 this._enabledForTest = {}; | 289 this._enabledForTest = {}; |
290 | 290 |
291 // Add currently running experiments here. | 291 // Add currently running experiments here. |
292 this.applyCustomStylesheet = this._createExperiment("applyCustomStylesheet",
"Allow custom UI themes"); | 292 this.applyCustomStylesheet = this._createExperiment("applyCustomStylesheet",
"Allow custom UI themes"); |
293 this.canvasInspection = this._createExperiment("canvasInspection ", "Canvas
inspection"); | 293 this.canvasInspection = this._createExperiment("canvasInspection ", "Canvas
inspection"); |
294 this.devicesPanel = this._createExperiment("devicesPanel", "Devices panel"); | 294 this.devicesPanel = this._createExperiment("devicesPanel", "Devices panel"); |
295 this.disableAgentsWhenProfile = this._createExperiment("disableAgentsWhenPro
file", "Disable other agents and UI when profiler is active", true); | 295 this.disableAgentsWhenProfile = this._createExperiment("disableAgentsWhenPro
file", "Disable other agents and UI when profiler is active", true); |
296 this.dockToLeft = this._createExperiment("dockToLeft", "Dock to left", true)
; | 296 this.dockToLeft = this._createExperiment("dockToLeft", "Dock to left", true)
; |
297 this.editorInDrawer = this._createExperiment("showEditorInDrawer", "Editor i
n drawer", true); | |
298 this.fileSystemInspection = this._createExperiment("fileSystemInspection", "
FileSystem inspection"); | 297 this.fileSystemInspection = this._createExperiment("fileSystemInspection", "
FileSystem inspection"); |
299 this.frameworksDebuggingSupport = this._createExperiment("frameworksDebuggin
gSupport", "JavaScript frameworks debugging"); | 298 this.frameworksDebuggingSupport = this._createExperiment("frameworksDebuggin
gSupport", "JavaScript frameworks debugging"); |
300 this.gpuTimeline = this._createExperiment("gpuTimeline", "GPU data on timeli
ne", true); | 299 this.gpuTimeline = this._createExperiment("gpuTimeline", "GPU data on timeli
ne", true); |
301 this.heapSnapshotStatistics = this._createExperiment("heapSnapshotStatistics
", "Heap snapshot statistics", true); | 300 this.heapSnapshotStatistics = this._createExperiment("heapSnapshotStatistics
", "Heap snapshot statistics", true); |
302 this.layersPanel = this._createExperiment("layersPanel", "Layers panel", tru
e); | 301 this.layersPanel = this._createExperiment("layersPanel", "Layers panel", tru
e); |
303 this.timelineOnTraceEvents = this._createExperiment("timelineOnTraceEvents",
"Timeline on trace events", true); | 302 this.timelineOnTraceEvents = this._createExperiment("timelineOnTraceEvents",
"Timeline on trace events", true); |
304 this.timelinePowerProfiler = this._createExperiment("timelinePowerProfiler",
"Timeline power profiler"); | 303 this.timelinePowerProfiler = this._createExperiment("timelinePowerProfiler",
"Timeline power profiler"); |
305 this.timelineJSCPUProfile = this._createExperiment("timelineJSCPUProfile", "
Timeline with JS sampling"); | 304 this.timelineJSCPUProfile = this._createExperiment("timelineJSCPUProfile", "
Timeline with JS sampling"); |
306 this.timelineNoLiveUpdate = this._createExperiment("timelineNoLiveUpdate", "
Timeline w/o live update", true); | 305 this.timelineNoLiveUpdate = this._createExperiment("timelineNoLiveUpdate", "
Timeline w/o live update", true); |
307 this.workersInMainWindow = this._createExperiment("workersInMainWindow", "Wo
rkers in main window", true); | 306 this.workersInMainWindow = this._createExperiment("workersInMainWindow", "Wo
rkers in main window", true); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 | 590 |
592 _updateVersionFrom6To7: function() | 591 _updateVersionFrom6To7: function() |
593 { | 592 { |
594 if (!window.localStorage) | 593 if (!window.localStorage) |
595 return; | 594 return; |
596 | 595 |
597 var settingNames = { | 596 var settingNames = { |
598 "sourcesPanelNavigatorSplitViewState": "sourcesPanelNavigatorSplitVi
ewState", | 597 "sourcesPanelNavigatorSplitViewState": "sourcesPanelNavigatorSplitVi
ewState", |
599 "elementsPanelSplitViewState": "elementsPanelSplitViewState", | 598 "elementsPanelSplitViewState": "elementsPanelSplitViewState", |
600 "canvasProfileViewReplaySplitViewState": "canvasProfileViewReplaySpl
itViewState", | 599 "canvasProfileViewReplaySplitViewState": "canvasProfileViewReplaySpl
itViewState", |
601 "editorInDrawerSplitViewState": "editorInDrawerSplitViewState", | |
602 "stylesPaneSplitViewState": "stylesPaneSplitViewState", | 600 "stylesPaneSplitViewState": "stylesPaneSplitViewState", |
603 "sourcesPanelDebuggerSidebarSplitViewState": "sourcesPanelDebuggerSi
debarSplitViewState" | 601 "sourcesPanelDebuggerSidebarSplitViewState": "sourcesPanelDebuggerSi
debarSplitViewState" |
604 }; | 602 }; |
605 | 603 |
606 for (var name in settingNames) { | 604 for (var name in settingNames) { |
607 if (!(name in window.localStorage)) | 605 if (!(name in window.localStorage)) |
608 continue; | 606 continue; |
609 var setting = WebInspector.settings.createSetting(name, undefined); | 607 var setting = WebInspector.settings.createSetting(name, undefined); |
610 var value = setting.get(); | 608 var value = setting.get(); |
611 if (!value) | 609 if (!value) |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 | 761 |
764 _fireChangedIfNeeded: function() | 762 _fireChangedIfNeeded: function() |
765 { | 763 { |
766 var newValue = this._calculateValue(); | 764 var newValue = this._calculateValue(); |
767 if (newValue === this._value) | 765 if (newValue === this._value) |
768 return; | 766 return; |
769 this._value = newValue; | 767 this._value = newValue; |
770 this._eventSupport.dispatchEventToListeners(this._name, this._value); | 768 this._eventSupport.dispatchEventToListeners(this._name, this._value); |
771 } | 769 } |
772 } | 770 } |
OLD | NEW |