OLD | NEW |
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 /** | 6 /** |
7 * This is the absolute difference maintained between standard and | 7 * This is the absolute difference maintained between standard and |
8 * fixed-width font sizes. http://crbug.com/91922. | 8 * fixed-width font sizes. http://crbug.com/91922. |
9 * @const @private {number} | 9 * @const @private {number} |
10 */ | 10 */ |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 useSystemTheme_: { | 100 useSystemTheme_: { |
101 type: Boolean, | 101 type: Boolean, |
102 value: false, // Can only be true on Linux, but value exists everywhere. | 102 value: false, // Can only be true on Linux, but value exists everywhere. |
103 }, | 103 }, |
104 | 104 |
105 /** @private {!Map<string, string>} */ | 105 /** @private {!Map<string, string>} */ |
106 focusConfig_: { | 106 focusConfig_: { |
107 type: Object, | 107 type: Object, |
108 value: function() { | 108 value: function() { |
109 var map = new Map(); | 109 var map = new Map(); |
110 map.set( | 110 if (settings.routes.FONTS) { |
111 settings.Route.FONTS.path, | 111 map.set( |
112 '#customize-fonts-subpage-trigger .subpage-arrow'); | 112 settings.routes.FONTS.path, |
| 113 '#customize-fonts-subpage-trigger .subpage-arrow'); |
| 114 } |
113 return map; | 115 return map; |
114 }, | 116 }, |
115 }, | 117 }, |
116 }, | 118 }, |
117 | 119 |
118 /** @private {?settings.AppearanceBrowserProxy} */ | 120 /** @private {?settings.AppearanceBrowserProxy} */ |
119 browserProxy_: null, | 121 browserProxy_: null, |
120 | 122 |
121 observers: [ | 123 observers: [ |
122 'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)', | 124 'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)', |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 getShowHomeSubLabel_: function(showHomepage, isNtp, homepageValue) { | 164 getShowHomeSubLabel_: function(showHomepage, isNtp, homepageValue) { |
163 if (!showHomepage) | 165 if (!showHomepage) |
164 return this.i18n('homeButtonDisabled'); | 166 return this.i18n('homeButtonDisabled'); |
165 if (isNtp) | 167 if (isNtp) |
166 return this.i18n('homePageNtp'); | 168 return this.i18n('homePageNtp'); |
167 return homepageValue || this.i18n('customWebAddress'); | 169 return homepageValue || this.i18n('customWebAddress'); |
168 }, | 170 }, |
169 | 171 |
170 /** @private */ | 172 /** @private */ |
171 onCustomizeFontsTap_: function() { | 173 onCustomizeFontsTap_: function() { |
172 settings.navigateTo(settings.Route.FONTS); | 174 settings.navigateTo(settings.routes.FONTS); |
173 }, | 175 }, |
174 | 176 |
175 /** @private */ | 177 /** @private */ |
176 onDisableExtension_: function() { | 178 onDisableExtension_: function() { |
177 this.fire('refresh-pref', 'homepage'); | 179 this.fire('refresh-pref', 'homepage'); |
178 }, | 180 }, |
179 | 181 |
180 /** | 182 /** |
181 * @param {number} value The changed font size slider value. | 183 * @param {number} value The changed font size slider value. |
182 * @private | 184 * @private |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 * @see content::ZoomValuesEqual(). | 308 * @see content::ZoomValuesEqual(). |
307 * @param {number} zoom1 | 309 * @param {number} zoom1 |
308 * @param {number} zoom2 | 310 * @param {number} zoom2 |
309 * @return {boolean} | 311 * @return {boolean} |
310 * @private | 312 * @private |
311 */ | 313 */ |
312 zoomValuesEqual_: function(zoom1, zoom2) { | 314 zoomValuesEqual_: function(zoom1, zoom2) { |
313 return Math.abs(zoom1 - zoom2) <= 0.001; | 315 return Math.abs(zoom1 - zoom2) <= 0.001; |
314 }, | 316 }, |
315 }); | 317 }); |
OLD | NEW |