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

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: rebase 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 readOnly: true,
47 },
48 48
49 /** 49 /**
50 * ID of the page. 50 * ID of the page.
51 *
52 * @attribute PAGE_ID
53 * @const string
54 * @default 'a11y'
55 */ 51 */
56 PAGE_ID: 'a11y', 52 PAGE_ID: {
53 type: String,
54 value: 'a11y',
55 readOnly: true,
56 },
57 57
58 /** 58 /**
59 * Title for the page header and navigation menu. 59 * Title for the page header and navigation menu.
60 *
61 * @attribute pageTitle
62 * @type string
63 */ 60 */
64 pageTitle: loadTimeData.getString('a11yPageTitle'), 61 pageTitle: {
62 type: String,
63 value: function() { return loadTimeData.getString('a11yPageTitle'); },
64 },
65 65
66 /** 66 /**
67 * Name of the 'core-icon' to show. 67 * Name of the 'iron-icon' to show.
68 *
69 * @attribute icon
70 * @type string
71 * @default 'accessibility'
72 */ 68 */
73 icon: 'accessibility', 69 icon: {
70 type: String,
71 value: 'accessibility',
72 readOnly: true,
73 },
74 },
75
76 /**
77 * Called when the selected value of the autoclick dropdown changes.
78 * TODO(jlklein): Replace with binding when paper-dropdown lands.
79 * @private
80 */
81 autoclickSelectChanged_: function() {
82 this.prefs.settings.settings.a11y.autoclick_delay_ms =
83 this.$.autoclickDropdown.value;
74 }, 84 },
75 }); 85 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698