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 21 matching lines...) Expand all Loading... |
32 var Preferences = { | 32 var Preferences = { |
33 maxInlineTextChildLength: 80, | 33 maxInlineTextChildLength: 80, |
34 minDrawerHeight: 25, | 34 minDrawerHeight: 25, |
35 minSidebarWidth: 100, | 35 minSidebarWidth: 100, |
36 minSidebarHeight: 75, | 36 minSidebarHeight: 75, |
37 applicationTitle: "Developer Tools - %s" | 37 applicationTitle: "Developer Tools - %s" |
38 } | 38 } |
39 | 39 |
40 var Capabilities = { | 40 var Capabilities = { |
41 isMainFrontend: false, | 41 isMainFrontend: false, |
| 42 canProfilePower: false, |
42 } | 43 } |
43 | 44 |
44 /** | 45 /** |
45 * @constructor | 46 * @constructor |
46 */ | 47 */ |
47 WebInspector.Settings = function() | 48 WebInspector.Settings = function() |
48 { | 49 { |
49 this._eventSupport = new WebInspector.Object(); | 50 this._eventSupport = new WebInspector.Object(); |
50 this._registry = /** @type {!Object.<string, !WebInspector.Setting>} */ ({})
; | 51 this._registry = /** @type {!Object.<string, !WebInspector.Setting>} */ ({})
; |
51 | 52 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 this.showEditorInDrawer = this._createExperiment("showEditorInDrawer", "Show
editor in drawer"); | 283 this.showEditorInDrawer = this._createExperiment("showEditorInDrawer", "Show
editor in drawer"); |
283 this.gpuTimeline = this._createExperiment("gpuTimeline", "Show GPU data on t
imeline"); | 284 this.gpuTimeline = this._createExperiment("gpuTimeline", "Show GPU data on t
imeline"); |
284 this.applyCustomStylesheet = this._createExperiment("applyCustomStylesheet",
"Allow custom UI themes"); | 285 this.applyCustomStylesheet = this._createExperiment("applyCustomStylesheet",
"Allow custom UI themes"); |
285 this.workersInMainWindow = this._createExperiment("workersInMainWindow", "Sh
ow workers in main window"); | 286 this.workersInMainWindow = this._createExperiment("workersInMainWindow", "Sh
ow workers in main window"); |
286 this.dockToLeft = this._createExperiment("dockToLeft", "Enable dock to left
mode"); | 287 this.dockToLeft = this._createExperiment("dockToLeft", "Enable dock to left
mode"); |
287 this.allocationProfiler = this._createExperiment("allocationProfiler", "Enab
le JavaScript heap allocation profiler"); | 288 this.allocationProfiler = this._createExperiment("allocationProfiler", "Enab
le JavaScript heap allocation profiler"); |
288 this.timelineFlameChart = this._createExperiment("timelineFlameChart", "Enab
le FlameChart mode in Timeline"); | 289 this.timelineFlameChart = this._createExperiment("timelineFlameChart", "Enab
le FlameChart mode in Timeline"); |
289 this.heapSnapshotStatistics = this._createExperiment("heapSnapshotStatistics
", "Show memory breakdown statistics in heap snapshots"); | 290 this.heapSnapshotStatistics = this._createExperiment("heapSnapshotStatistics
", "Show memory breakdown statistics in heap snapshots"); |
290 this.timelineNoLiveUpdate = this._createExperiment("timelineNoLiveUpdate", "
Timeline w/o live update"); | 291 this.timelineNoLiveUpdate = this._createExperiment("timelineNoLiveUpdate", "
Timeline w/o live update"); |
291 this.cssStyleSearch = this._createExperiment("cssStyleSearch", "Enable Style
s search and Computed style filtering"); | 292 this.cssStyleSearch = this._createExperiment("cssStyleSearch", "Enable Style
s search and Computed style filtering"); |
| 293 this.powerProfiler = this._createExperiment("powerProfiler", "Enable power m
ode in Timeline"); |
292 | 294 |
293 this._cleanUpSetting(); | 295 this._cleanUpSetting(); |
294 } | 296 } |
295 | 297 |
296 WebInspector.ExperimentsSettings.prototype = { | 298 WebInspector.ExperimentsSettings.prototype = { |
297 /** | 299 /** |
298 * @return {!Array.<!WebInspector.Experiment>} | 300 * @return {!Array.<!WebInspector.Experiment>} |
299 */ | 301 */ |
300 get experiments() | 302 get experiments() |
301 { | 303 { |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 { | 602 { |
601 // If there are too many breakpoints in a storage, it is likely due to a
recent bug that caused | 603 // If there are too many breakpoints in a storage, it is likely due to a
recent bug that caused |
602 // periodical breakpoints duplication leading to inspector slowness. | 604 // periodical breakpoints duplication leading to inspector slowness. |
603 if (breakpointsSetting.get().length > maxBreakpointsCount) | 605 if (breakpointsSetting.get().length > maxBreakpointsCount) |
604 breakpointsSetting.set([]); | 606 breakpointsSetting.set([]); |
605 } | 607 } |
606 } | 608 } |
607 | 609 |
608 WebInspector.settings = new WebInspector.Settings(); | 610 WebInspector.settings = new WebInspector.Settings(); |
609 WebInspector.experimentsSettings = new WebInspector.ExperimentsSettings(WebInspe
ctor.queryParam("experiments") !== null); | 611 WebInspector.experimentsSettings = new WebInspector.ExperimentsSettings(WebInspe
ctor.queryParam("experiments") !== null); |
OLD | NEW |