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

Unified Diff: chrome/browser/resources/settings/a11y_page/a11y_page.js

Issue 1137103002: Convert a11y page to Polymer 0.8 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ready and bind to the select value. Created 5 years, 7 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: 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..42af0c03d9279d276832dbb661103821145a4a57 100644
--- a/chrome/browser/resources/settings/a11y_page/a11y_page.js
+++ b/chrome/browser/resources/settings/a11y_page/a11y_page.js
@@ -9,67 +9,74 @@
*
* 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: String,
/**
* 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,
michaelpg 2015/05/12 08:03:42 for "constant" properties, set readonly: true (pre
Jeremy Klein 2015/05/12 17:28:56 Great point. I'll add that in all my CLs where app
+ 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.
- *
- * @attribute icon
- * @type string
- * @default 'accessibility'
+ * Name of the 'iron-icon' to show.
*/
- icon: 'accessibility',
+ icon: {
+ type: String,
+ value: 'accessibility',
+ },
+ },
+
+ /**
+ * 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;
},
});

Powered by Google App Engine
This is Rietveld 408576698