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

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

Issue 2825493003: MD Settings: change outlinks to actually use <a> (Closed)
Patch Set: updates based on comments 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 /** 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 3, 87 3,
88 4, 88 4,
89 5, 89 5,
90 ], 90 ],
91 }, 91 },
92 92
93 /** @private */ 93 /** @private */
94 themeSublabel_: String, 94 themeSublabel_: String,
95 95
96 /** @private */ 96 /** @private */
97 themeUrl_: String,
98
99 /** @private */
97 useSystemTheme_: { 100 useSystemTheme_: {
98 type: Boolean, 101 type: Boolean,
99 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.
100 }, 103 },
101 104
102 /** @private {!Map<string, string>} */ 105 /** @private {!Map<string, string>} */
103 focusConfig_: { 106 focusConfig_: {
104 type: Object, 107 type: Object,
105 value: function() { 108 value: function() {
106 var map = new Map(); 109 var map = new Map();
107 map.set( 110 map.set(
108 settings.Route.FONTS.path, 111 settings.Route.FONTS.path,
109 '#customize-fonts-subpage-trigger .subpage-arrow'); 112 '#customize-fonts-subpage-trigger .subpage-arrow');
110 return map; 113 return map;
111 }, 114 },
112 }, 115 },
113 }, 116 },
114 117
115 /** @private {?settings.AppearanceBrowserProxy} */ 118 /** @private {?settings.AppearanceBrowserProxy} */
116 browserProxy_: null, 119 browserProxy_: null,
117 120
118 /** @private {string} */
119 themeUrl_: '',
120
121 observers: [ 121 observers: [
122 'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)', 122 'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)',
123 'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)', 123 'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)',
124 124
125 // <if expr="is_linux and not chromeos"> 125 // <if expr="is_linux and not chromeos">
126 // NOTE: this pref only exists on Linux. 126 // NOTE: this pref only exists on Linux.
127 'useSystemThemePrefChanged_(prefs.extensions.theme.use_system.value)', 127 'useSystemThemePrefChanged_(prefs.extensions.theme.use_system.value)',
128 // </if> 128 // </if>
129 ], 129 ],
130 130
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 * @private 180 * @private
181 */ 181 */
182 defaultFontSizeChanged_: function(value) { 182 defaultFontSizeChanged_: function(value) {
183 // This pref is handled separately in some extensions, but here it is tied 183 // This pref is handled separately in some extensions, but here it is tied
184 // to default_font_size (to simplify the UI). 184 // to default_font_size (to simplify the UI).
185 this.set( 185 this.set(
186 'prefs.webkit.webprefs.default_fixed_font_size.value', 186 'prefs.webkit.webprefs.default_fixed_font_size.value',
187 value - SIZE_DIFFERENCE_FIXED_STANDARD_); 187 value - SIZE_DIFFERENCE_FIXED_STANDARD_);
188 }, 188 },
189 189
190 /** @private */ 190 /**
191 onThemesTap_: function() { 191 * URL for either current theme or the theme gallery.
dschuyler 2017/04/20 18:50:04 @return {string}
scottchen 2017/04/20 21:48:34 Done. Sorry, missed it the first time you said it.
192 window.open(this.themeUrl_ || loadTimeData.getString('themesGalleryUrl')); 192 * @private
193 */
194 getThemeHref_: function() {
195 return this.themeUrl_ || loadTimeData.getString('themesGalleryUrl');
193 }, 196 },
194 197
195 // <if expr="chromeos"> 198 // <if expr="chromeos">
196 /** 199 /**
197 * ChromeOS only. 200 * ChromeOS only.
198 * @private 201 * @private
199 */ 202 */
200 openWallpaperManager_: function() { 203 openWallpaperManager_: function() {
201 this.browserProxy_.openWallpaperManager(); 204 this.browserProxy_.openWallpaperManager();
202 }, 205 },
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 * @see content::ZoomValuesEqual(). 303 * @see content::ZoomValuesEqual().
301 * @param {number} zoom1 304 * @param {number} zoom1
302 * @param {number} zoom2 305 * @param {number} zoom2
303 * @return {boolean} 306 * @return {boolean}
304 * @private 307 * @private
305 */ 308 */
306 zoomValuesEqual_: function(zoom1, zoom2) { 309 zoomValuesEqual_: function(zoom1, zoom2) {
307 return Math.abs(zoom1 - zoom2) <= 0.001; 310 return Math.abs(zoom1 - zoom2) <= 0.001;
308 }, 311 },
309 }); 312 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698