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

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

Issue 1301813002: DevTools: propagate experiments that are enabled by default into default. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 Runtime.experiments.register("gpuTimeline", "GPU data on timeline", true ); 134 Runtime.experiments.register("gpuTimeline", "GPU data on timeline", true );
135 Runtime.experiments.register("inputEventsOnTimelineOverview", "Input eve nts on Timeline overview", true); 135 Runtime.experiments.register("inputEventsOnTimelineOverview", "Input eve nts on Timeline overview", true);
136 Runtime.experiments.register("layersPanel", "Layers panel"); 136 Runtime.experiments.register("layersPanel", "Layers panel");
137 Runtime.experiments.register("layoutEditor", "Layout editor", true); 137 Runtime.experiments.register("layoutEditor", "Layout editor", true);
138 Runtime.experiments.register("materialDesign", "Material design"); 138 Runtime.experiments.register("materialDesign", "Material design");
139 Runtime.experiments.register("networkRequestHeadersFilterInDetailsView", "Network request headers filter in details view", true); 139 Runtime.experiments.register("networkRequestHeadersFilterInDetailsView", "Network request headers filter in details view", true);
140 Runtime.experiments.register("networkRequestsOnTimeline", "Network reque sts on Timeline", true); 140 Runtime.experiments.register("networkRequestsOnTimeline", "Network reque sts on Timeline", true);
141 Runtime.experiments.register("privateScriptInspection", "Private script inspection"); 141 Runtime.experiments.register("privateScriptInspection", "Private script inspection");
142 Runtime.experiments.register("promiseTracker", "Promise inspector"); 142 Runtime.experiments.register("promiseTracker", "Promise inspector");
143 Runtime.experiments.register("securityPanel", "Security panel", true); 143 Runtime.experiments.register("securityPanel", "Security panel", true);
144 Runtime.experiments.register("serviceWorkersInPageFrontend", "Service wo rkers in DevTools for page");
145 Runtime.experiments.register("serviceWorkersInResources", "Service worke rs in Resources panel", true); 144 Runtime.experiments.register("serviceWorkersInResources", "Service worke rs in Resources panel", true);
146 Runtime.experiments.register("showPrimaryLoadWaterfallInNetworkTimeline" , "Show primary load waterfall in Network timeline", true); 145 Runtime.experiments.register("showPrimaryLoadWaterfallInNetworkTimeline" , "Show primary load waterfall in Network timeline", true);
147 Runtime.experiments.register("stepIntoAsync", "Step into async"); 146 Runtime.experiments.register("stepIntoAsync", "Step into async");
148 Runtime.experiments.register("timelineInvalidationTracking", "Timeline i nvalidation tracking", true); 147 Runtime.experiments.register("timelineInvalidationTracking", "Timeline i nvalidation tracking", true);
149 Runtime.experiments.register("timelineTracingJSProfile", "Timeline traci ng based JS profiler", true); 148 Runtime.experiments.register("timelineTracingJSProfile", "Timeline traci ng based JS profiler", true);
150 Runtime.experiments.register("timelineFlowEvents", "Timeline flow events ", true); 149 Runtime.experiments.register("timelineFlowEvents", "Timeline flow events ", true);
151 Runtime.experiments.register("tooltips", "Tooltips");
152 Runtime.experiments.register("inlineVariableValues", "Display variable v alues inline while debugging");
153 150
154 Runtime.experiments.cleanUpStaleExperiments(); 151 Runtime.experiments.cleanUpStaleExperiments();
155 152
156 if (InspectorFrontendHost.isUnderTest()) { 153 if (InspectorFrontendHost.isUnderTest()) {
157 var testPath = JSON.parse(prefs["testPath"] || "\"\""); 154 var testPath = JSON.parse(prefs["testPath"] || "\"\"");
158 // Enable experiments for testing. 155 // Enable experiments for testing.
159 if (testPath.indexOf("debugger/promise") !== -1) 156 if (testPath.indexOf("debugger/promise") !== -1)
160 Runtime.experiments.enableForTest("promiseTracker"); 157 Runtime.experiments.enableForTest("promiseTracker");
161 if (testPath.indexOf("elements/") !== -1) 158 if (testPath.indexOf("elements/") !== -1)
162 Runtime.experiments.enableForTest("animationInspection"); 159 Runtime.experiments.enableForTest("animationInspection");
163 if (testPath.indexOf("layers/") !== -1) 160 if (testPath.indexOf("layers/") !== -1)
164 Runtime.experiments.enableForTest("layersPanel"); 161 Runtime.experiments.enableForTest("layersPanel");
165 if (testPath.indexOf("service-workers/") !== -1) 162 if (testPath.indexOf("service-workers/") !== -1)
166 Runtime.experiments.enableForTest("serviceWorkersInResources"); 163 Runtime.experiments.enableForTest("serviceWorkersInResources");
167 if (testPath.indexOf("timeline/") !== -1 || testPath.indexOf("layers /") !== -1) 164 if (testPath.indexOf("timeline/") !== -1 || testPath.indexOf("layers /") !== -1)
168 Runtime.experiments.enableForTest("layersPanel"); 165 Runtime.experiments.enableForTest("layersPanel");
169 } 166 }
170 167
171 Runtime.experiments.setDefaultExperiments([ 168 Runtime.experiments.setDefaultExperiments([
172 "inlineVariableValues",
173 "serviceWorkersInPageFrontend",
174 "tooltips"
175 ]); 169 ]);
176 }, 170 },
177 171
178 /** 172 /**
179 * @suppressGlobalPropertiesCheck 173 * @suppressGlobalPropertiesCheck
180 */ 174 */
181 _createAppUI: function() 175 _createAppUI: function()
182 { 176 {
183 console.timeStamp("Main._createApp"); 177 console.timeStamp("Main._createApp");
184 178
185 WebInspector.initializeUIUtils(window); 179 WebInspector.initializeUIUtils(window);
186 WebInspector.installComponentRootStyles(/** @type {!Element} */ (documen t.body)); 180 WebInspector.installComponentRootStyles(/** @type {!Element} */ (documen t.body));
187 181
188 this._addMainEventListeners(document); 182 this._addMainEventListeners(document);
189 183
190 var canDock = !!Runtime.queryParam("can_dock"); 184 var canDock = !!Runtime.queryParam("can_dock");
191 WebInspector.zoomManager = new WebInspector.ZoomManager(window, Inspecto rFrontendHost); 185 WebInspector.zoomManager = new WebInspector.ZoomManager(window, Inspecto rFrontendHost);
192 WebInspector.inspectorView = new WebInspector.InspectorView(); 186 WebInspector.inspectorView = new WebInspector.InspectorView();
193 WebInspector.ContextMenu.initialize(); 187 WebInspector.ContextMenu.initialize();
194 WebInspector.ContextMenu.installHandler(document); 188 WebInspector.ContextMenu.installHandler(document);
195 if (Runtime.experiments.isEnabled("tooltips")) 189 WebInspector.Tooltip.installHandler(document);
196 WebInspector.Tooltip.installHandler(document);
197 WebInspector.dockController = new WebInspector.DockController(canDock); 190 WebInspector.dockController = new WebInspector.DockController(canDock);
198 WebInspector.overridesSupport = new WebInspector.OverridesSupport(); 191 WebInspector.overridesSupport = new WebInspector.OverridesSupport();
199 WebInspector.emulatedDevicesList = new WebInspector.EmulatedDevicesList( ); 192 WebInspector.emulatedDevicesList = new WebInspector.EmulatedDevicesList( );
200 WebInspector.multitargetConsoleModel = new WebInspector.MultitargetConso leModel(); 193 WebInspector.multitargetConsoleModel = new WebInspector.MultitargetConso leModel();
201 WebInspector.multitargetNetworkManager = new WebInspector.MultitargetNet workManager(); 194 WebInspector.multitargetNetworkManager = new WebInspector.MultitargetNet workManager();
202 195
203 WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen(); 196 WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen();
204 // set order of some sections explicitly 197 // set order of some sections explicitly
205 WebInspector.shortcutsScreen.section(WebInspector.UIString("Elements Pan el")); 198 WebInspector.shortcutsScreen.section(WebInspector.UIString("Elements Pan el"));
206 WebInspector.shortcutsScreen.section(WebInspector.UIString("Styles Pane" )); 199 WebInspector.shortcutsScreen.section(WebInspector.UIString("Styles Pane" ));
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 p.classList.add("help-section"); 935 p.classList.add("help-section");
943 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically."); 936 p.textContent = WebInspector.UIString("Inspected worker has terminated. Once it restarts we will attach to it automatically.");
944 } 937 }
945 938
946 WebInspector.WorkerTerminatedScreen.prototype = { 939 WebInspector.WorkerTerminatedScreen.prototype = {
947 940
948 __proto__: WebInspector.HelpScreen.prototype 941 __proto__: WebInspector.HelpScreen.prototype
949 } 942 }
950 943
951 new WebInspector.Main(); 944 new WebInspector.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698