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

Unified Diff: Source/devtools/front_end/SettingsUI.js

Issue 213423010: DevTools: Migrate General tab settings to extensions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/SettingsUI.js
diff --git a/Source/devtools/front_end/SettingsUI.js b/Source/devtools/front_end/SettingsUI.js
index 25a4f6bb05d2dbc50a1a2ddc8f9b75f56172a9fd..574b6a90b19028a6cb143fb07d7dc0f48afbd419 100644
--- a/Source/devtools/front_end/SettingsUI.js
+++ b/Source/devtools/front_end/SettingsUI.js
@@ -95,3 +95,99 @@ WebInspector.SettingsUI.createSettingFieldset = function(setting)
fieldset.disabled = !setting.get();
}
}
+
+/**
+ * @param {string} text
+ * @return {?string}
+ */
+WebInspector.SettingsUI.regexValidator = function(text)
+{
+ var regex;
+ try {
+ regex = new RegExp(text);
+ } catch (e) {
+ }
+ return regex ? null : WebInspector.UIString("Invalid pattern");
+}
+
+/**
+ * @constructor
+ */
+WebInspector.UISettingDelegate = function()
+{
+}
+
+WebInspector.UISettingDelegate.prototype = {
pfeldman 2014/03/27 15:27:14 Let users return elements instead.
apavlov 2014/03/28 10:21:23 Done.
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ settingChanged: function(event)
+ {
+ },
+
+ /**
+ * @return {!Array.<*>|undefined}
+ */
+ titleTemplateArguments: function()
+ {
+ return undefined;
+ }
+}
+
+/**
+ * @constructor
+ * @extends {WebInspector.UISettingDelegate}
+ */
+WebInspector.SelectUISettingDelegate = function()
pfeldman 2014/03/27 15:27:14 Lets either use elements or derive from descriptor
apavlov 2014/03/28 10:21:23 Done.
+{
+ WebInspector.UISettingDelegate.call(this);
+}
+
+WebInspector.SelectUISettingDelegate.prototype = {
+ /**
+ * @return {!Array.<!Array.<*>>}
+ */
+ settingOptions: function()
+ {
+ throw "Not implemented";
+ },
+
+ __proto__: WebInspector.UISettingDelegate.prototype
+}
+
+/**
+ * @constructor
+ * @extends {WebInspector.UISettingDelegate}
+ */
+WebInspector.InputUISettingDelegate = function()
pfeldman 2014/03/27 15:27:14 Ditto
apavlov 2014/03/28 10:21:23 Done.
+{
+ WebInspector.UISettingDelegate.call(this);
+}
+
+WebInspector.InputUISettingDelegate.prototype = {
+ /**
+ * @param {string} value
+ * @return {?string}
+ */
+ validateInput: function(value)
+ {
+ return null;
+ },
+
+ __proto__: WebInspector.UISettingDelegate.prototype
+}
+
+/**
+ * @interface
+ */
+WebInspector.ConfigurableUISettingDelegate = function()
+{
+}
+
+WebInspector.ConfigurableUISettingDelegate.prototype = {
+ /**
+ * @param {!Element} settingElement
+ * @param {!Element} containerElement
+ */
+ configure: function(settingElement, containerElement) {}
+}

Powered by Google App Engine
This is Rietveld 408576698