Commit e95044b6 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

DevTools: propagate experiments that are enabled by default into default.

Review URL: https://codereview.chromium.org/1301813002

git-svn-id: svn://svn.chromium.org/blink/trunk@200777 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5b7dbda5
...@@ -64,8 +64,7 @@ WebInspector.AdvancedApp.prototype = { ...@@ -64,8 +64,7 @@ WebInspector.AdvancedApp.prototype = {
WebInspector.initializeUIUtils(toolboxDocument.defaultView); WebInspector.initializeUIUtils(toolboxDocument.defaultView);
WebInspector.installComponentRootStyles(/** @type {!Element} */ (toolboxDocument.body)); WebInspector.installComponentRootStyles(/** @type {!Element} */ (toolboxDocument.body));
WebInspector.ContextMenu.installHandler(toolboxDocument); WebInspector.ContextMenu.installHandler(toolboxDocument);
if (Runtime.experiments.isEnabled("tooltips")) WebInspector.Tooltip.installHandler(toolboxDocument);
WebInspector.Tooltip.installHandler(toolboxDocument);
var rootView = new WebInspector.RootView(); var rootView = new WebInspector.RootView();
var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder(); var inspectedPagePlaceholder = new WebInspector.InspectedPagePlaceholder();
......
...@@ -141,15 +141,12 @@ WebInspector.Main.prototype = { ...@@ -141,15 +141,12 @@ WebInspector.Main.prototype = {
Runtime.experiments.register("privateScriptInspection", "Private script inspection"); Runtime.experiments.register("privateScriptInspection", "Private script inspection");
Runtime.experiments.register("promiseTracker", "Promise inspector"); Runtime.experiments.register("promiseTracker", "Promise inspector");
Runtime.experiments.register("securityPanel", "Security panel", true); Runtime.experiments.register("securityPanel", "Security panel", true);
Runtime.experiments.register("serviceWorkersInPageFrontend", "Service workers in DevTools for page");
Runtime.experiments.register("serviceWorkersInResources", "Service workers in Resources panel", true); Runtime.experiments.register("serviceWorkersInResources", "Service workers in Resources panel", true);
Runtime.experiments.register("showPrimaryLoadWaterfallInNetworkTimeline", "Show primary load waterfall in Network timeline", true); Runtime.experiments.register("showPrimaryLoadWaterfallInNetworkTimeline", "Show primary load waterfall in Network timeline", true);
Runtime.experiments.register("stepIntoAsync", "Step into async"); Runtime.experiments.register("stepIntoAsync", "Step into async");
Runtime.experiments.register("timelineInvalidationTracking", "Timeline invalidation tracking", true); Runtime.experiments.register("timelineInvalidationTracking", "Timeline invalidation tracking", true);
Runtime.experiments.register("timelineTracingJSProfile", "Timeline tracing based JS profiler", true); Runtime.experiments.register("timelineTracingJSProfile", "Timeline tracing based JS profiler", true);
Runtime.experiments.register("timelineFlowEvents", "Timeline flow events", true); Runtime.experiments.register("timelineFlowEvents", "Timeline flow events", true);
Runtime.experiments.register("tooltips", "Tooltips");
Runtime.experiments.register("inlineVariableValues", "Display variable values inline while debugging");
Runtime.experiments.cleanUpStaleExperiments(); Runtime.experiments.cleanUpStaleExperiments();
...@@ -169,9 +166,6 @@ WebInspector.Main.prototype = { ...@@ -169,9 +166,6 @@ WebInspector.Main.prototype = {
} }
Runtime.experiments.setDefaultExperiments([ Runtime.experiments.setDefaultExperiments([
"inlineVariableValues",
"serviceWorkersInPageFrontend",
"tooltips"
]); ]);
}, },
...@@ -192,8 +186,7 @@ WebInspector.Main.prototype = { ...@@ -192,8 +186,7 @@ WebInspector.Main.prototype = {
WebInspector.inspectorView = new WebInspector.InspectorView(); WebInspector.inspectorView = new WebInspector.InspectorView();
WebInspector.ContextMenu.initialize(); WebInspector.ContextMenu.initialize();
WebInspector.ContextMenu.installHandler(document); WebInspector.ContextMenu.installHandler(document);
if (Runtime.experiments.isEnabled("tooltips")) WebInspector.Tooltip.installHandler(document);
WebInspector.Tooltip.installHandler(document);
WebInspector.dockController = new WebInspector.DockController(canDock); WebInspector.dockController = new WebInspector.DockController(canDock);
WebInspector.overridesSupport = new WebInspector.OverridesSupport(); WebInspector.overridesSupport = new WebInspector.OverridesSupport();
WebInspector.emulatedDevicesList = new WebInspector.EmulatedDevicesList(); WebInspector.emulatedDevicesList = new WebInspector.EmulatedDevicesList();
......
...@@ -139,7 +139,7 @@ WebInspector.Target.prototype = { ...@@ -139,7 +139,7 @@ WebInspector.Target.prototype = {
this.tracingManager = new WebInspector.TracingManager(this); this.tracingManager = new WebInspector.TracingManager(this);
if (this.isPage() && (Runtime.experiments.isEnabled("serviceWorkersInPageFrontend") || Runtime.experiments.isEnabled("serviceWorkersInResources"))) if (this.isPage())
this.serviceWorkerManager = new WebInspector.ServiceWorkerManager(this); this.serviceWorkerManager = new WebInspector.ServiceWorkerManager(this);
if (callback) if (callback)
......
...@@ -729,7 +729,7 @@ WebInspector.JavaScriptSourceFrame.prototype = { ...@@ -729,7 +729,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
_generateValuesInSource: function() _generateValuesInSource: function()
{ {
if (!Runtime.experiments.isEnabled("inlineVariableValues") || !WebInspector.moduleSetting("inlineVariableValues").get()) if (!WebInspector.moduleSetting("inlineVariableValues").get())
return; return;
var executionContext = WebInspector.context.flavor(WebInspector.ExecutionContext); var executionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
if (!executionContext) if (!executionContext)
......
...@@ -75,8 +75,7 @@ WebInspector.SourcesPanel = function(workspaceForTest) ...@@ -75,8 +75,7 @@ WebInspector.SourcesPanel = function(workspaceForTest)
this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this)); this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this));
this.sidebarPanes.scopechain = new WebInspector.ScopeChainSidebarPane(); this.sidebarPanes.scopechain = new WebInspector.ScopeChainSidebarPane();
if (Runtime.experiments.isEnabled("serviceWorkersInPageFrontend")) this.sidebarPanes.serviceWorkers = new WebInspector.ServiceWorkersSidebarPane();
this.sidebarPanes.serviceWorkers = new WebInspector.ServiceWorkersSidebarPane();
this.sidebarPanes.jsBreakpoints = new WebInspector.JavaScriptBreakpointsSidebarPane(WebInspector.breakpointManager, this.showUISourceCode.bind(this)); this.sidebarPanes.jsBreakpoints = new WebInspector.JavaScriptBreakpointsSidebarPane(WebInspector.breakpointManager, this.showUISourceCode.bind(this));
this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.createProxy(this); this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.createProxy(this);
this.sidebarPanes.xhrBreakpoints = new WebInspector.XHRBreakpointsSidebarPane(); this.sidebarPanes.xhrBreakpoints = new WebInspector.XHRBreakpointsSidebarPane();
...@@ -445,7 +444,7 @@ WebInspector.SourcesPanel.prototype = { ...@@ -445,7 +444,7 @@ WebInspector.SourcesPanel.prototype = {
this._stepIntoButton.setEnabled(false); this._stepIntoButton.setEnabled(false);
this._stepOutButton.setEnabled(false); this._stepOutButton.setEnabled(false);
} else if (this._paused) { } else if (this._paused) {
this._updateButtonTitle(this._pauseButton, WebInspector.UIString("Resume script execution")); this._pauseButton.setTitle(WebInspector.UIString("Resume script execution"));
this._pauseButton.setToggled(true); this._pauseButton.setToggled(true);
this._pauseButton.setLongClickOptionsEnabled((function() { return [ this._longResumeButton ]; }).bind(this)); this._pauseButton.setLongClickOptionsEnabled((function() { return [ this._longResumeButton ]; }).bind(this));
...@@ -454,7 +453,7 @@ WebInspector.SourcesPanel.prototype = { ...@@ -454,7 +453,7 @@ WebInspector.SourcesPanel.prototype = {
this._stepIntoButton.setEnabled(true); this._stepIntoButton.setEnabled(true);
this._stepOutButton.setEnabled(true); this._stepOutButton.setEnabled(true);
} else { } else {
this._updateButtonTitle(this._pauseButton, WebInspector.UIString("Pause script execution")); this._pauseButton.setTitle(WebInspector.UIString("Pause script execution"));
this._pauseButton.setToggled(false); this._pauseButton.setToggled(false);
this._pauseButton.setLongClickOptionsEnabled(null); this._pauseButton.setLongClickOptionsEnabled(null);
...@@ -783,21 +782,6 @@ WebInspector.SourcesPanel.prototype = { ...@@ -783,21 +782,6 @@ WebInspector.SourcesPanel.prototype = {
return debugToolbarDrawer; return debugToolbarDrawer;
}, },
/**
* @param {!WebInspector.ToolbarButton} button
* @param {string} buttonTitle
*/
_updateButtonTitle: function(button, buttonTitle)
{
var hasShortcuts = button._shortcuts && button._shortcuts.length;
if (hasShortcuts && Runtime.experiments.isEnabled("tooltips"))
button.setTitle(buttonTitle);
else if (hasShortcuts)
button.setTitle(WebInspector.UIString(buttonTitle + " (%s)", button._shortcuts[0].name));
else
button.setTitle(buttonTitle);
},
/** /**
* @param {string} buttonId * @param {string} buttonId
* @param {string} buttonTitle * @param {string} buttonTitle
...@@ -809,7 +793,7 @@ WebInspector.SourcesPanel.prototype = { ...@@ -809,7 +793,7 @@ WebInspector.SourcesPanel.prototype = {
var button = new WebInspector.ToolbarButton(buttonTitle, buttonId); var button = new WebInspector.ToolbarButton(buttonTitle, buttonId);
button.setAction(actionId); button.setAction(actionId);
button._shortcuts = WebInspector.shortcutRegistry.shortcutDescriptorsForAction(actionId); button._shortcuts = WebInspector.shortcutRegistry.shortcutDescriptorsForAction(actionId);
this._updateButtonTitle(button, buttonTitle); button.setTitle(buttonTitle);
return button; return button;
}, },
......
...@@ -132,12 +132,7 @@ WebInspector.Tooltip.installHandler = function(doc) ...@@ -132,12 +132,7 @@ WebInspector.Tooltip.installHandler = function(doc)
*/ */
WebInspector.Tooltip.install = function(element, tooltipContent, actionId) WebInspector.Tooltip.install = function(element, tooltipContent, actionId)
{ {
if (Runtime.experiments.isEnabled("tooltips") && typeof tooltipContent === "string" && tooltipContent === "") if (typeof tooltipContent === "string" && tooltipContent === "")
return; return;
if (Runtime.experiments.isEnabled("tooltips")) element[WebInspector.Tooltip._symbol] = { content: tooltipContent, actionId: actionId };
element[WebInspector.Tooltip._symbol] = { content: tooltipContent, actionId: actionId };
else if (typeof tooltipContent === "string")
element.title = tooltipContent;
else
console.assert("Cannot set an element without custom tooltips enabled");
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment