Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / devtools / front_end / SettingsScreen.js
index 5eb969e..beee61f 100644 (file)
@@ -285,6 +285,8 @@ WebInspector.GenericSettingsTab = function()
     this._appendDrawerNote(p.lastElementChild);
     var splitVerticallyTitle = WebInspector.UIString("Split panels vertically when docked to %s", WebInspector.experimentsSettings.dockToLeft.isEnabled() ? "left or right" : "right");
     p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(splitVerticallyTitle, WebInspector.settings.splitVerticallyWhenDockedToRight));
+    var panelShortcutTitle = WebInspector.UIString("Enable %s + 1-9 shortcut to switch panels", WebInspector.isMac() ? "Cmd" : "Ctrl");
+    p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(panelShortcutTitle, WebInspector.settings.shortcutPanelSwitch));
 
     p = this._appendSection(WebInspector.UIString("Elements"));
     var colorFormatElement = this._createSelectSetting(WebInspector.UIString("Color format"), [
@@ -339,15 +341,25 @@ WebInspector.GenericSettingsTab = function()
     p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Log XMLHttpRequests"), WebInspector.settings.monitoringXHREnabled));
     p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIString("Preserve log upon navigation"), WebInspector.settings.preserveConsoleLog));
 
-    if (WebInspector.extensionServer.hasExtensions()) {
+    if (WebInspector.openAnchorLocationRegistry.handlerNames.length > 0) {
         var handlerSelector = new WebInspector.HandlerSelector(WebInspector.openAnchorLocationRegistry);
         p = this._appendSection(WebInspector.UIString("Extensions"));
         p.appendChild(this._createCustomSetting(WebInspector.UIString("Open links in"), handlerSelector.element));
     }
 
     p = this._appendSection();
-    var panelShortcutTitle = WebInspector.UIString("Enable %s + 1-9 shortcut to switch panels", WebInspector.isMac() ? "Cmd" : "Ctrl");
-    p.appendChild(WebInspector.SettingsUI.createSettingCheckbox(panelShortcutTitle, WebInspector.settings.shortcutPanelSwitch));
+
+    var restoreDefaults = p.createChild("input", "settings-tab-text-button");
+    restoreDefaults.type = "button";
+    restoreDefaults.value = WebInspector.UIString("Restore defaults and reload");
+    restoreDefaults.addEventListener("click", restoreAndReload);
+
+    function restoreAndReload()
+    {
+        if (window.localStorage)
+            window.localStorage.clear();
+        WebInspector.reload();
+    }
 }
 
 WebInspector.GenericSettingsTab.prototype = {