| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 this._nameToSettingElement = new Map(); | 181 this._nameToSettingElement = new Map(); |
| 182 for (var sectionName of explicitSectionOrder) | 182 for (var sectionName of explicitSectionOrder) |
| 183 this._sectionElement(sectionName); | 183 this._sectionElement(sectionName); |
| 184 self.runtime.extensions("setting").forEach(this._addSetting.bind(this)); | 184 self.runtime.extensions("setting").forEach(this._addSetting.bind(this)); |
| 185 self.runtime.extensions(WebInspector.SettingUI).forEach(this._addSettingUI.b
ind(this)); | 185 self.runtime.extensions(WebInspector.SettingUI).forEach(this._addSettingUI.b
ind(this)); |
| 186 | 186 |
| 187 this._appendSection().appendChild(createTextButton(WebInspector.UIString("Re
store defaults and reload"), restoreAndReload)); | 187 this._appendSection().appendChild(createTextButton(WebInspector.UIString("Re
store defaults and reload"), restoreAndReload)); |
| 188 | 188 |
| 189 function restoreAndReload() | 189 function restoreAndReload() |
| 190 { | 190 { |
| 191 if (window.localStorage) | 191 WebInspector.settings.clearAll(); |
| 192 window.localStorage.clear(); | |
| 193 WebInspector.reload(); | 192 WebInspector.reload(); |
| 194 } | 193 } |
| 195 } | 194 } |
| 196 | 195 |
| 197 WebInspector.GenericSettingsTab.prototype = { | 196 WebInspector.GenericSettingsTab.prototype = { |
| 198 /** | 197 /** |
| 199 * @param {!Runtime.Extension} extension | 198 * @param {!Runtime.Extension} extension |
| 200 */ | 199 */ |
| 201 _addSetting: function(extension) | 200 _addSetting: function(extension) |
| 202 { | 201 { |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 var columnId = columns[i]; | 1063 var columnId = columns[i]; |
| 1065 var editElement = this._addInputElements.get(columnId); | 1064 var editElement = this._addInputElements.get(columnId); |
| 1066 this._setEditElementValue(editElement, ""); | 1065 this._setEditElementValue(editElement, ""); |
| 1067 } | 1066 } |
| 1068 }, | 1067 }, |
| 1069 | 1068 |
| 1070 __proto__: WebInspector.SettingsList.prototype | 1069 __proto__: WebInspector.SettingsList.prototype |
| 1071 } | 1070 } |
| 1072 | 1071 |
| 1073 WebInspector._settingsController = new WebInspector.SettingsController(); | 1072 WebInspector._settingsController = new WebInspector.SettingsController(); |
| OLD | NEW |