Chromium Code Reviews| 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..c40ef430f7cf07ad3a3b0fed808bec1cf976fe3f 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,88 @@ |
| * @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, |
|
Jeremy Klein
2015/05/12 21:02:36
Object, notify:true.
Kyle Horimoto
2015/05/12 21:41:52
Done.
|
| /** |
| * Route for the page. |
| - * |
| - * @attribute route |
| * @type {string} |
| - * @default '' |
| */ |
| - route: '', |
| + route: { |
| + type: String, |
| + value: '' |
| + }, |
| /** |
| * Whether the page is a subpage. |
| - * |
| - * @attribute subpage |
| * @type {boolean} |
|
Jeremy Klein
2015/05/12 21:02:36
nit: Remove unnecessary @type on primitives.
Kyle Horimoto
2015/05/12 21:41:53
Done.
|
| - * @default true |
| */ |
| - subpage: true, |
| + subpage: { |
|
Jeremy Klein
2015/05/12 21:02:36
Make this, PAGE_ID, and icon readOnly: true.
Kyle Horimoto
2015/05/12 21:41:53
Done.
|
| + type: Boolean, |
| + value: 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') |
| + }, |
| /** |
| * 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' |
| + }, |
| /** |
| * 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: '' |
| + }, |
| }, |
| /** @override */ |