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

Side by Side Diff: chrome/browser/resources/settings/a11y_page/a11y_page.js

Issue 2811693004: MD Settings: Restore focus after exiting various subpages. (Closed)
Patch Set: Address comments, fix test. Created 3 years, 8 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 * 'settings-a11y-page' is the small section of advanced settings with 7 * 'settings-a11y-page' is the small section of advanced settings with
8 * a link to the web store accessibility page on most platforms, and 8 * a link to the web store accessibility page on most platforms, and
9 * a subpage with lots of other settings on Chrome OS. 9 * a subpage with lots of other settings on Chrome OS.
10 */ 10 */
11 Polymer({ 11 Polymer({
12 is: 'settings-a11y-page', 12 is: 'settings-a11y-page',
13 13
14 properties: { 14 properties: {
15 /** 15 /**
16 * The current active route. 16 * The current active route.
17 */ 17 */
18 currentRoute: { 18 currentRoute: {
19 type: Object, 19 type: Object,
20 notify: true, 20 notify: true,
21 }, 21 },
22 22
23 /** 23 /**
24 * Preferences state. 24 * Preferences state.
25 */ 25 */
26 prefs: { 26 prefs: {
27 type: Object, 27 type: Object,
28 notify: true, 28 notify: true,
29 }, 29 },
30
31 /** @private {!Map<string, string>} */
32 focusConfig_: {
33 type: Object,
34 value: function() {
35 var map = new Map();
36 // <if expr="chromeos">
37 map.set(
38 settings.Route.MANAGE_ACCESSIBILITY.path,
39 '#subpage-trigger .subpage-arrow');
40 // </if>
41 return map;
42 },
43 },
30 }, 44 },
31 45
32 // <if expr="chromeos"> 46 // <if expr="chromeos">
33 /** @private */ 47 /** @private */
34 onManageAccessibilityFeaturesTap_: function() { 48 onManageAccessibilityFeaturesTap_: function() {
35 settings.navigateTo(settings.Route.MANAGE_ACCESSIBILITY); 49 settings.navigateTo(settings.Route.MANAGE_ACCESSIBILITY);
36 }, 50 },
37 // </if> 51 // </if>
38 52
39 /** @private */ 53 /** @private */
40 onMoreFeaturesTap_: function() { 54 onMoreFeaturesTap_: function() {
41 window.open( 55 window.open(
42 'https://chrome.google.com/webstore/category/collection/accessibility'); 56 'https://chrome.google.com/webstore/category/collection/accessibility');
43 }, 57 },
44 }); 58 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698