Chromium Code Reviews| Index: chrome/browser/resources/settings/a11y_page/a11y_page.js |
| diff --git a/chrome/browser/resources/settings/a11y_page/a11y_page.js b/chrome/browser/resources/settings/a11y_page/a11y_page.js |
| index 616a004abc9804269d9a163b821cc5677ab6e149..f86e32d00268f4e543099c9dbf8076c514128b4d 100644 |
| --- a/chrome/browser/resources/settings/a11y_page/a11y_page.js |
| +++ b/chrome/browser/resources/settings/a11y_page/a11y_page.js |
| @@ -9,67 +9,83 @@ |
| * |
| * Example: |
| * |
| - * <core-animated-pages> |
| + * <iron-animated-pages> |
| * <cr-settings-a11y-page prefs="{{prefs}}"></cr-settings-a11y-page> |
| * ... other pages ... |
| - * </core-animated-pages> |
| + * </iron-animated-pages> |
| * |
| * @group Chrome Settings Elements |
| * @element cr-settings-a11y-page |
| */ |
| -Polymer('cr-settings-a11y-page', { |
| - publish: { |
| +Polymer({ |
| + is: 'cr-settings-a11y-page', |
| + |
| + properties: { |
| /** |
| * Preferences state. |
| * |
| - * @attribute prefs |
| - * @type CrSettingsPrefsElement |
| + * @type {?CrSettingsPrefsElement} |
| * @default null |
| */ |
| - 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 false |
| */ |
| - subpage: false, |
| + subpage: { |
| + type: Boolean, |
| + value: false, |
| + }, |
| /** |
| * ID of the page. |
| - * |
| - * @attribute PAGE_ID |
| - * @const string |
| - * @default 'a11y' |
| */ |
| - PAGE_ID: 'a11y', |
| + PAGE_ID: { |
| + type: String, |
| + value: 'a11y', |
| + }, |
| /** |
| * Title for the page header and navigation menu. |
| - * |
| - * @attribute pageTitle |
| - * @type string |
| */ |
| - pageTitle: loadTimeData.getString('a11yPageTitle'), |
| + pageTitle: { |
| + type: String, |
| + value: function() { return loadTimeData.getString('a11yPageTitle'); }, |
| + }, |
| /** |
| * Name of the 'core-icon' to show. |
|
michaelpg
2015/05/12 05:52:05
iron-icon
Jeremy Klein
2015/05/12 06:23:22
Done.
|
| - * |
| - * @attribute icon |
| - * @type string |
| - * @default 'accessibility' |
| */ |
| - icon: 'accessibility', |
| + icon: { |
| + type: String, |
| + value: 'accessibility', |
| + }, |
| + }, |
| + |
| + /** @override */ |
| + ready: function() { |
| + this.$.autoclickDropdown.value = |
|
michaelpg
2015/05/12 05:52:05
for this and the below, I would just bind to the <
Jeremy Klein
2015/05/12 06:23:22
But that won't actually do anything. I'd rather ha
michaelpg
2015/05/12 07:04:33
Oh, you're right, the changes from the <select> wo
|
| + this.prefs.settings.settings.a11y.autoclick_delay_ms; |
| + }, |
| + |
| + /** |
| + * Called when the selected value of the autoclick dropdown changes. |
| + * TODO(jlklein): Replace with binding when paper-dropdown lands. |
| + * @private |
| + */ |
| + autoclickSelectChanged_: function() { |
| + this.prefs.settings.settings.a11y.autoclick_delay_ms = |
| + this.$.autoclickDropdown.value; |
| }, |
| }); |