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

Side by Side Diff: chrome/browser/resources/settings/appearance_page/appearance_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 * 'settings-appearance-page' is the settings page containing appearance 6 * 'settings-appearance-page' is the settings page containing appearance
7 * settings. 7 * settings.
8 * 8 *
9 * Example: 9 * Example:
10 * 10 *
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 }, 82 },
83 83
84 /** @private */ 84 /** @private */
85 themeSublabel_: String, 85 themeSublabel_: String,
86 86
87 /** @private */ 87 /** @private */
88 useSystemTheme_: { 88 useSystemTheme_: {
89 type: Boolean, 89 type: Boolean,
90 value: false, // Can only be true on Linux, but value exists everywhere. 90 value: false, // Can only be true on Linux, but value exists everywhere.
91 }, 91 },
92
93 /** @private {!Map<string, string>} */
94 focusConfig_: {
95 type: Object,
96 value: function() {
97 var map = new Map();
98 map.set(
99 settings.Route.FONTS.path,
100 '#customize-fonts-subpage-trigger .subpage-arrow');
101 return map;
102 },
103 },
92 }, 104 },
93 105
94 /** @private {?settings.AppearanceBrowserProxy} */ 106 /** @private {?settings.AppearanceBrowserProxy} */
95 browserProxy_: null, 107 browserProxy_: null,
96 108
97 /** @private {string} */ 109 /** @private {string} */
98 themeUrl_: '', 110 themeUrl_: '',
99 111
100 observers: [ 112 observers: [
101 'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)', 113 'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)',
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 * @see content::ZoomValuesEqual(). 278 * @see content::ZoomValuesEqual().
267 * @param {number} zoom1 279 * @param {number} zoom1
268 * @param {number} zoom2 280 * @param {number} zoom2
269 * @return {boolean} 281 * @return {boolean}
270 * @private 282 * @private
271 */ 283 */
272 zoomValuesEqual_: function(zoom1, zoom2) { 284 zoomValuesEqual_: function(zoom1, zoom2) {
273 return Math.abs(zoom1 - zoom2) <= 0.001; 285 return Math.abs(zoom1 - zoom2) <= 0.001;
274 }, 286 },
275 }); 287 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698