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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'cr-settings-a11y-page' is the settings page containing accessibility 7 * 'cr-settings-a11y-page' is the settings page containing accessibility
8 * settings. 8 * settings.
9 * 9 *
10 * Example: 10 * Example:
11 * 11 *
12 * <core-animated-pages> 12 * <iron-animated-pages>
13 * <cr-settings-a11y-page prefs="{{prefs}}"></cr-settings-a11y-page> 13 * <cr-settings-a11y-page prefs="{{prefs}}"></cr-settings-a11y-page>
14 * ... other pages ... 14 * ... other pages ...
15 * </core-animated-pages> 15 * </iron-animated-pages>
16 * 16 *
17 * @group Chrome Settings Elements 17 * @group Chrome Settings Elements
18 * @element cr-settings-a11y-page 18 * @element cr-settings-a11y-page
19 */ 19 */
20 Polymer('cr-settings-a11y-page', { 20 Polymer({
21 publish: { 21 is: 'cr-settings-a11y-page',
22
23 properties: {
22 /** 24 /**
23 * Preferences state. 25 * Preferences state.
24 * 26 *
25 * @attribute prefs 27 * @type {?CrSettingsPrefsElement}
26 * @type CrSettingsPrefsElement
27 * @default null 28 * @default null
28 */ 29 */
29 prefs: null, 30 prefs: {
31 type: Object,
32 notify: true,
33 },
30 34
31 /** 35 /**
32 * Route for the page. 36 * Route for the page.
33 *
34 * @attribute route
35 * @type string
36 * @default ''
37 */ 37 */
38 route: '', 38 route: String,
39 39
40 /** 40 /**
41 * Whether the page is a subpage. 41 * Whether the page is a subpage.
42 *
43 * @attribute subpage
44 * @type boolean
45 * @default false
46 */ 42 */
47 subpage: false, 43 subpage: {
44 type: Boolean,
45 value: false,
46 },
48 47
49 /** 48 /**
50 * ID of the page. 49 * ID of the page.
51 *
52 * @attribute PAGE_ID
53 * @const string
54 * @default 'a11y'
55 */ 50 */
56 PAGE_ID: 'a11y', 51 PAGE_ID: {
52 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
53 value: 'a11y',
54 },
57 55
58 /** 56 /**
59 * Title for the page header and navigation menu. 57 * Title for the page header and navigation menu.
60 *
61 * @attribute pageTitle
62 * @type string
63 */ 58 */
64 pageTitle: loadTimeData.getString('a11yPageTitle'), 59 pageTitle: {
60 type: String,
61 value: function() { return loadTimeData.getString('a11yPageTitle'); },
62 },
65 63
66 /** 64 /**
67 * Name of the 'core-icon' to show. 65 * Name of the 'iron-icon' to show.
68 *
69 * @attribute icon
70 * @type string
71 * @default 'accessibility'
72 */ 66 */
73 icon: 'accessibility', 67 icon: {
68 type: String,
69 value: 'accessibility',
70 },
71 },
72
73 /**
74 * Called when the selected value of the autoclick dropdown changes.
75 * TODO(jlklein): Replace with binding when paper-dropdown lands.
76 * @private
77 */
78 autoclickSelectChanged_: function() {
79 this.prefs.settings.settings.a11y.autoclick_delay_ms =
80 this.$.autoclickDropdown.value;
74 }, 81 },
75 }); 82 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698