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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2649023007: DevTools: implement release note behind an experiment (Closed)
Patch Set: make test platform independent Created 3 years, 9 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
OLDNEW
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 Runtime.experiments.register('colorContrastRatio', 'Contrast ratio line in c olor picker', true); 100 Runtime.experiments.register('colorContrastRatio', 'Contrast ratio line in c olor picker', true);
101 Runtime.experiments.register('continueToFirstInvocation', 'Continue to first invocation', true); 101 Runtime.experiments.register('continueToFirstInvocation', 'Continue to first invocation', true);
102 Runtime.experiments.register('cssTrackerPanel', 'Panel that tracks the usage of CSS rules.'); 102 Runtime.experiments.register('cssTrackerPanel', 'Panel that tracks the usage of CSS rules.');
103 Runtime.experiments.register('emptySourceMapAutoStepping', 'Empty sourcemap auto-stepping'); 103 Runtime.experiments.register('emptySourceMapAutoStepping', 'Empty sourcemap auto-stepping');
104 Runtime.experiments.register('inputEventsOnTimelineOverview', 'Input events on Timeline overview', true); 104 Runtime.experiments.register('inputEventsOnTimelineOverview', 'Input events on Timeline overview', true);
105 Runtime.experiments.register('liveSASS', 'Live SASS'); 105 Runtime.experiments.register('liveSASS', 'Live SASS');
106 Runtime.experiments.register('networkGroupingRequests', 'Network request gro ups support', true); 106 Runtime.experiments.register('networkGroupingRequests', 'Network request gro ups support', true);
107 Runtime.experiments.register('objectPreviews', 'Object previews', true); 107 Runtime.experiments.register('objectPreviews', 'Object previews', true);
108 Runtime.experiments.register('persistence2', 'Persistence 2.0'); 108 Runtime.experiments.register('persistence2', 'Persistence 2.0');
109 Runtime.experiments.register('persistenceValidation', 'Validate persistence bindings'); 109 Runtime.experiments.register('persistenceValidation', 'Validate persistence bindings');
110 Runtime.experiments.register('releaseNote', 'Release note', true);
110 Runtime.experiments.register('requestBlocking', 'Request blocking', true); 111 Runtime.experiments.register('requestBlocking', 'Request blocking', true);
111 Runtime.experiments.register('timelineShowAllEvents', 'Show all events on Ti meline', true); 112 Runtime.experiments.register('timelineShowAllEvents', 'Show all events on Ti meline', true);
112 Runtime.experiments.register('timelineShowAllProcesses', 'Show all processes on Timeline', true); 113 Runtime.experiments.register('timelineShowAllProcesses', 'Show all processes on Timeline', true);
113 Runtime.experiments.register('timelinePaintTimingMarkers', 'Show paint timin g markers on Timeline', true); 114 Runtime.experiments.register('timelinePaintTimingMarkers', 'Show paint timin g markers on Timeline', true);
114 Runtime.experiments.register('sourceDiff', 'Source diff'); 115 Runtime.experiments.register('sourceDiff', 'Source diff');
115 Runtime.experiments.register('terminalInDrawer', 'Terminal in drawer', true) ; 116 Runtime.experiments.register('terminalInDrawer', 'Terminal in drawer', true) ;
116 Runtime.experiments.register('timelineInvalidationTracking', 'Timeline inval idation tracking', true); 117 Runtime.experiments.register('timelineInvalidationTracking', 'Timeline inval idation tracking', true);
117 Runtime.experiments.register('timelineMultipleMainViews', 'Timeline with mul tiple main views'); 118 Runtime.experiments.register('timelineMultipleMainViews', 'Timeline with mul tiple main views');
118 Runtime.experiments.register('timelineTracingJSProfile', 'Timeline tracing b ased JS profiler', true); 119 Runtime.experiments.register('timelineTracingJSProfile', 'Timeline tracing b ased JS profiler', true);
119 Runtime.experiments.register('timelineV8RuntimeCallStats', 'V8 Runtime Call Stats on Timeline', true); 120 Runtime.experiments.register('timelineV8RuntimeCallStats', 'V8 Runtime Call Stats on Timeline', true);
120 Runtime.experiments.register('timelinePerFrameTrack', 'Show track per frame on Timeline', true); 121 Runtime.experiments.register('timelinePerFrameTrack', 'Show track per frame on Timeline', true);
121 122
122 Runtime.experiments.cleanUpStaleExperiments(); 123 Runtime.experiments.cleanUpStaleExperiments();
123 124
124 if (Host.isUnderTest(prefs)) { 125 if (Host.isUnderTest(prefs)) {
125 var testPath = JSON.parse(prefs['testPath'] || '""'); 126 var testPath = JSON.parse(prefs['testPath'] || '""');
126 // Enable experiments for testing. 127 // Enable experiments for testing.
127 if (testPath.indexOf('accessibility/') !== -1) 128 if (testPath.indexOf('accessibility/') !== -1)
128 Runtime.experiments.enableForTest('accessibilityInspection'); 129 Runtime.experiments.enableForTest('accessibilityInspection');
129 if (testPath.indexOf('coverage') !== -1) 130 if (testPath.indexOf('coverage') !== -1)
130 Runtime.experiments.enableForTest('cssTrackerPanel'); 131 Runtime.experiments.enableForTest('cssTrackerPanel');
131 if (testPath.indexOf('audits2/') !== -1) 132 if (testPath.indexOf('audits2/') !== -1)
132 Runtime.experiments.enableForTest('audits2'); 133 Runtime.experiments.enableForTest('audits2');
134 if (testPath.indexOf('help/') !== -1)
135 Runtime.experiments.enableForTest('releaseNote');
133 } 136 }
134 137
135 Runtime.experiments.setDefaultExperiments(['persistenceValidation', 'timelin eMultipleMainViews']); 138 Runtime.experiments.setDefaultExperiments(['persistenceValidation', 'timelin eMultipleMainViews']);
136 } 139 }
137 140
138 /** 141 /**
139 * @suppressGlobalPropertiesCheck 142 * @suppressGlobalPropertiesCheck
140 */ 143 */
141 _createAppUI() { 144 _createAppUI() {
142 console.time('Main._createAppUI'); 145 console.time('Main._createAppUI');
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 function webSocketConnectionLost() { 274 function webSocketConnectionLost() {
272 if (!Main._disconnectedScreenWithReasonWasShown) 275 if (!Main._disconnectedScreenWithReasonWasShown)
273 Main.RemoteDebuggingTerminatedScreen.show('WebSocket disconnected'); 276 Main.RemoteDebuggingTerminatedScreen.show('WebSocket disconnected');
274 } 277 }
275 } 278 }
276 279
277 _lateInitialization() { 280 _lateInitialization() {
278 console.timeStamp('Main._lateInitialization'); 281 console.timeStamp('Main._lateInitialization');
279 this._registerShortcuts(); 282 this._registerShortcuts();
280 Extensions.extensionServer.initializeExtensions(); 283 Extensions.extensionServer.initializeExtensions();
284 if (!Host.isUnderTest())
285 Help.showReleaseNoteIfNeeded();
281 } 286 }
282 287
283 _registerForwardedShortcuts() { 288 _registerForwardedShortcuts() {
284 /** @const */ var forwardedActions = 289 /** @const */ var forwardedActions =
285 ['main.toggle-dock', 'debugger.toggle-breakpoints-active', 'debugger.tog gle-pause', 'commandMenu.show']; 290 ['main.toggle-dock', 'debugger.toggle-breakpoints-active', 'debugger.tog gle-pause', 'commandMenu.show'];
286 var actionKeys = 291 var actionKeys =
287 UI.shortcutRegistry.keysForActions(forwardedActions).map(UI.KeyboardShor tcut.keyCodeAndModifiersFromKey); 292 UI.shortcutRegistry.keysForActions(forwardedActions).map(UI.KeyboardShor tcut.keyCodeAndModifiersFromKey);
288 InspectorFrontendHost.setWhitelistedShortcuts(JSON.stringify(actionKeys)); 293 InspectorFrontendHost.setWhitelistedShortcuts(JSON.stringify(actionKeys));
289 } 294 }
290 295
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 * @override 981 * @override
977 * @return {?Element} 982 * @return {?Element}
978 */ 983 */
979 settingElement() { 984 settingElement() {
980 return UI.SettingsUI.createSettingCheckbox( 985 return UI.SettingsUI.createSettingCheckbox(
981 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' )); 986 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers' ));
982 } 987 }
983 }; 988 };
984 989
985 new Main.Main(); 990 new Main.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698