Index: chrome/browser/resources/settings/search_engines_page/search_engines_page.js |
diff --git a/chrome/browser/resources/settings/search_engines_page/search_engines_page.js b/chrome/browser/resources/settings/search_engines_page/search_engines_page.js |
index 176468ff44fbf26c7066cdb3597facf6656d6e87..5b5aa01e4834a3d52f4453122e704538935753a5 100644 |
--- a/chrome/browser/resources/settings/search_engines_page/search_engines_page.js |
+++ b/chrome/browser/resources/settings/search_engines_page/search_engines_page.js |
@@ -17,92 +17,89 @@ |
* @group Chrome Settings Elements |
* @element cr-settings-search-engines-page |
*/ |
-Polymer('cr-settings-search-engines-page', { |
- publish: { |
+Polymer({ |
+ is: 'cr-settings-search-engines-page', |
+ |
+ properties: { |
/** |
* Preferences state. |
- * |
- * @attribute prefs |
- * @type {CrSettingsPrefsElement} |
- * @default null |
+ * @type {?CrSettingsPrefsElement} |
*/ |
- prefs: null, |
+ prefs: { |
+ type: Object, |
+ notify: true |
+ }, |
/** |
* Route for the page. |
- * |
- * @attribute route |
- * @type {string} |
- * @default '' |
*/ |
- route: '', |
+ route: { |
+ type: String, |
+ value: '' |
+ }, |
/** |
* Whether the page is a subpage. |
- * |
- * @attribute subpage |
- * @type {boolean} |
- * @default true |
*/ |
- subpage: true, |
+ subpage: { |
+ type: Boolean, |
+ value: true, |
+ readOnly: true |
+ }, |
/** |
* ID of the page. |
- * |
- * @attribute PAGE_ID |
- * @const {string} |
- * @default 'search' |
*/ |
- PAGE_ID: 'search_engines', |
+ PAGE_ID: { |
+ type: String, |
+ value: 'search_engines', |
+ readOnly: true |
+ }, |
/** |
* Title for the page header and navigation menu. |
- * |
- * @attribute pageTitle |
- * @type {string} |
*/ |
- pageTitle: loadTimeData.getString('searchEnginesPageTitle'), |
+ pageTitle: { |
+ type: String, |
+ value: loadTimeData.getString('searchEnginesPageTitle'), |
+ readOnly: true |
+ }, |
/** |
* Name of the 'core-icon' to be shown in the settings-page-header. |
- * |
- * @attribute icon |
- * @type {string} |
- * @default 'search' |
*/ |
- icon: 'search', |
+ icon: { |
+ type: String, |
+ value: 'search', |
+ readOnly: true |
+ }, |
/** |
* List of default search engines available. |
- * |
- * @attribute defaultSearchEngines |
- * @type {Array<!SearchEngine>} |
- * @default null |
+ * @type {!Array<!SearchEngine>} |
*/ |
- defaultSearchEngines: null, |
+ defaultSearchEngines: { |
+ type: Array, |
+ value: function() { return []; } |
+ }, |
/** |
* List of other search engines available. |
- * |
- * @attribute otherSearchEngines |
- * @type {Array<!SearchEngine>} |
- * @default null |
+ * @type {!Array<!SearchEngine>} |
*/ |
- otherSearchEngines: null, |
+ otherSearchEngines: { |
+ type: Array, |
+ value: function() { return []; } |
+ }, |
/** |
* GUID of the currently selected default search engine. |
- * |
- * @attribute defaultEngineGuid |
- * @type {string} |
- * @default '' |
*/ |
- defaultEngineGuid: '', |
- }, |
- |
- /** @override */ |
- created: function() { |
- this.searchEngines = []; |
+ defaultEngineGuid: { |
+ type: String, |
+ value: '', |
+ observer: 'deafultEngineGuidChanged' |
+ }, |
}, |
/** @override */ |
@@ -121,7 +118,6 @@ Polymer('cr-settings-search-engines-page', { |
chrome.searchEnginesPrivate.setSelectedSearchEngine(this.defaultEngineGuid); |
}, |
- |
/** |
* Updates the lists of search engines based on the given |engines|. |
* @param {!Array<!SearchEngine>} engines All the search engines. |