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

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/Settings.js

Issue 2678623002: DevTools: pass title when creating settings (Closed)
Patch Set: ac Created 3 years, 10 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: third_party/WebKit/Source/devtools/front_end/common/Settings.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Settings.js b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
index ffa709e9e1da1367edc3b560e8eb50768daf0ed5..0c5f8d87a4aaacc4f917107aaf4aacd25450ef01 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/Settings.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
@@ -59,6 +59,8 @@ Common.Settings = class {
var isLocal = !!descriptor['local'];
var setting = settingType === 'regex' ? this.createRegExpSetting(settingName, defaultValue, undefined, isLocal) :
this.createSetting(settingName, defaultValue, isLocal);
+ if (descriptor['title'])
+ setting.setTitle(descriptor['title']);
this._moduleSettings.set(settingName, setting);
}
@@ -231,6 +233,8 @@ Common.Setting = class {
this._defaultValue = defaultValue;
this._eventSupport = eventSupport;
this._storage = storage;
+ /** @type {string} */
+ this._title = '';
}
/**
@@ -254,6 +258,20 @@ Common.Setting = class {
}
/**
+ * @return {string}
+ */
+ title() {
+ return this._title;
+ }
+
+ /**
+ * @param {string} title
+ */
+ setTitle(title) {
+ this._title = title;
+ }
+
+ /**
* @return {V}
*/
get() {

Powered by Google App Engine
This is Rietveld 408576698