OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 Runtime.experiments.register('continueToLocationMarkers', 'Continue to locat
ion markers', true); | 98 Runtime.experiments.register('continueToLocationMarkers', 'Continue to locat
ion markers', true); |
99 Runtime.experiments.register('colorContrastRatio', 'Contrast ratio line in c
olor picker', true); | 99 Runtime.experiments.register('colorContrastRatio', 'Contrast ratio line in c
olor picker', true); |
100 Runtime.experiments.register('cssTrackerPanel', 'Coverage support'); | 100 Runtime.experiments.register('cssTrackerPanel', 'Coverage support'); |
101 Runtime.experiments.register('emptySourceMapAutoStepping', 'Empty sourcemap
auto-stepping'); | 101 Runtime.experiments.register('emptySourceMapAutoStepping', 'Empty sourcemap
auto-stepping'); |
102 Runtime.experiments.register('inputEventsOnTimelineOverview', 'Input events
on Timeline overview', true); | 102 Runtime.experiments.register('inputEventsOnTimelineOverview', 'Input events
on Timeline overview', true); |
103 Runtime.experiments.register('liveSASS', 'Live SASS'); | 103 Runtime.experiments.register('liveSASS', 'Live SASS'); |
104 Runtime.experiments.register('networkGroupingRequests', 'Network request gro
ups support', true); | 104 Runtime.experiments.register('networkGroupingRequests', 'Network request gro
ups support', true); |
105 Runtime.experiments.register('objectPreviews', 'Object previews', true); | 105 Runtime.experiments.register('objectPreviews', 'Object previews', true); |
106 Runtime.experiments.register('persistence2', 'Persistence 2.0'); | 106 Runtime.experiments.register('persistence2', 'Persistence 2.0'); |
107 Runtime.experiments.register('persistenceValidation', 'Validate persistence
bindings'); | 107 Runtime.experiments.register('persistenceValidation', 'Validate persistence
bindings'); |
108 Runtime.experiments.register('releaseNote', 'Release note', true); | |
109 Runtime.experiments.register('requestBlocking', 'Request blocking', true); | 108 Runtime.experiments.register('requestBlocking', 'Request blocking', true); |
110 Runtime.experiments.register('timelineShowAllEvents', 'Show all events on Ti
meline', true); | 109 Runtime.experiments.register('timelineShowAllEvents', 'Show all events on Ti
meline', true); |
111 Runtime.experiments.register('timelineShowAllProcesses', 'Show all processes
on Timeline', true); | 110 Runtime.experiments.register('timelineShowAllProcesses', 'Show all processes
on Timeline', true); |
112 Runtime.experiments.register('timelinePaintTimingMarkers', 'Show paint timin
g markers on Timeline', true); | 111 Runtime.experiments.register('timelinePaintTimingMarkers', 'Show paint timin
g markers on Timeline', true); |
113 Runtime.experiments.register('sourceDiff', 'Source diff'); | 112 Runtime.experiments.register('sourceDiff', 'Source diff'); |
114 Runtime.experiments.register('timelineFlowEvents', 'Timeline flow events', t
rue); | 113 Runtime.experiments.register('timelineFlowEvents', 'Timeline flow events', t
rue); |
115 Runtime.experiments.register('terminalInDrawer', 'Terminal in drawer', true)
; | 114 Runtime.experiments.register('terminalInDrawer', 'Terminal in drawer', true)
; |
116 Runtime.experiments.register('timelineInvalidationTracking', 'Timeline inval
idation tracking', true); | 115 Runtime.experiments.register('timelineInvalidationTracking', 'Timeline inval
idation tracking', true); |
117 Runtime.experiments.register('timelineMultipleMainViews', 'Tabbed views on P
erformance panel'); | 116 Runtime.experiments.register('timelineMultipleMainViews', 'Tabbed views on P
erformance panel'); |
118 Runtime.experiments.register('timelineTracingJSProfile', 'Timeline tracing b
ased JS profiler', true); | 117 Runtime.experiments.register('timelineTracingJSProfile', 'Timeline tracing b
ased JS profiler', true); |
119 Runtime.experiments.register('timelineV8RuntimeCallStats', 'V8 Runtime Call
Stats on Timeline', true); | 118 Runtime.experiments.register('timelineV8RuntimeCallStats', 'V8 Runtime Call
Stats on Timeline', true); |
120 Runtime.experiments.register('timelinePerFrameTrack', 'Show track per frame
on Timeline', true); | 119 Runtime.experiments.register('timelinePerFrameTrack', 'Show track per frame
on Timeline', true); |
121 | 120 |
122 Runtime.experiments.cleanUpStaleExperiments(); | 121 Runtime.experiments.cleanUpStaleExperiments(); |
123 | 122 |
124 if (Host.isUnderTest(prefs)) { | 123 if (Host.isUnderTest(prefs)) { |
125 var testPath = JSON.parse(prefs['testPath'] || '""'); | 124 var testPath = JSON.parse(prefs['testPath'] || '""'); |
126 // Enable experiments for testing. | 125 // Enable experiments for testing. |
127 if (testPath.indexOf('accessibility/') !== -1) | 126 if (testPath.indexOf('accessibility/') !== -1) |
128 Runtime.experiments.enableForTest('accessibilityInspection'); | 127 Runtime.experiments.enableForTest('accessibilityInspection'); |
129 if (testPath.indexOf('coverage') !== -1) | 128 if (testPath.indexOf('coverage') !== -1) |
130 Runtime.experiments.enableForTest('cssTrackerPanel'); | 129 Runtime.experiments.enableForTest('cssTrackerPanel'); |
131 if (testPath.indexOf('audits2/') !== -1) | 130 if (testPath.indexOf('audits2/') !== -1) |
132 Runtime.experiments.enableForTest('audits2'); | 131 Runtime.experiments.enableForTest('audits2'); |
133 if (testPath.indexOf('help/') !== -1) | |
134 Runtime.experiments.enableForTest('releaseNote'); | |
135 if (testPath.indexOf('sass/') !== -1) | 132 if (testPath.indexOf('sass/') !== -1) |
136 Runtime.experiments.enableForTest('liveSASS'); | 133 Runtime.experiments.enableForTest('liveSASS'); |
137 } | 134 } |
138 | 135 |
139 Runtime.experiments.setDefaultExperiments(['persistenceValidation']); | 136 Runtime.experiments.setDefaultExperiments(['persistenceValidation']); |
140 } | 137 } |
141 | 138 |
142 /** | 139 /** |
143 * @suppressGlobalPropertiesCheck | 140 * @suppressGlobalPropertiesCheck |
144 */ | 141 */ |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 var descriptor = extension.descriptor(); | 734 var descriptor = extension.descriptor(); |
738 if (descriptor['persistence'] !== 'closeable') | 735 if (descriptor['persistence'] !== 'closeable') |
739 continue; | 736 continue; |
740 if (descriptor['location'] !== 'drawer-view' && descriptor['location'] !==
'panel') | 737 if (descriptor['location'] !== 'drawer-view' && descriptor['location'] !==
'panel') |
741 continue; | 738 continue; |
742 moreTools.appendItem(extension.title(), UI.viewManager.showView.bind(UI.vi
ewManager, descriptor['id'])); | 739 moreTools.appendItem(extension.title(), UI.viewManager.showView.bind(UI.vi
ewManager, descriptor['id'])); |
743 } | 740 } |
744 | 741 |
745 var helpSubMenu = contextMenu.namedSubMenu('mainMenuHelp'); | 742 var helpSubMenu = contextMenu.namedSubMenu('mainMenuHelp'); |
746 helpSubMenu.appendAction('settings.documentation'); | 743 helpSubMenu.appendAction('settings.documentation'); |
747 if (Runtime.experiments.isEnabled('releaseNote')) | 744 helpSubMenu.appendItem('Release Notes', () => InspectorFrontendHost.openInNe
wTab(Help.latestReleaseNote().link)); |
748 helpSubMenu.appendItem('Release Notes', () => InspectorFrontendHost.openIn
NewTab(Help.latestReleaseNote().link)); | |
749 contextMenu.show(); | 745 contextMenu.show(); |
750 } | 746 } |
751 }; | 747 }; |
752 | 748 |
753 /** | 749 /** |
754 * @unrestricted | 750 * @unrestricted |
755 */ | 751 */ |
756 Main.SourcesPanelIndicator = class { | 752 Main.SourcesPanelIndicator = class { |
757 constructor() { | 753 constructor() { |
758 Common.moduleSetting('javaScriptDisabled').addChangeListener(javaScriptDisab
ledChanged); | 754 Common.moduleSetting('javaScriptDisabled').addChangeListener(javaScriptDisab
ledChanged); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 * @override | 949 * @override |
954 * @return {?Element} | 950 * @return {?Element} |
955 */ | 951 */ |
956 settingElement() { | 952 settingElement() { |
957 return UI.SettingsUI.createSettingCheckbox( | 953 return UI.SettingsUI.createSettingCheckbox( |
958 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers'
)); | 954 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers'
)); |
959 } | 955 } |
960 }; | 956 }; |
961 | 957 |
962 new Main.Main(); | 958 new Main.Main(); |
OLD | NEW |