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

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

Issue 1798133002: [MD settings] add sub-label to Show Home Button check box (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review changes Created 4 years, 9 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
« no previous file with comments | « chrome/browser/resources/settings/appearance_page/appearance_page.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 // Query the initial state. 123 // Query the initial state.
124 cr.sendWithPromise('getResetThemeEnabled').then( 124 cr.sendWithPromise('getResetThemeEnabled').then(
125 this.setResetThemeEnabled.bind(this)); 125 this.setResetThemeEnabled.bind(this));
126 126
127 // Set up the change event listener. 127 // Set up the change event listener.
128 cr.addWebUIListener('reset-theme-enabled-changed', 128 cr.addWebUIListener('reset-theme-enabled-changed',
129 this.setResetThemeEnabled.bind(this)); 129 this.setResetThemeEnabled.bind(this));
130 }, 130 },
131 131
132 /** 132 /**
133 * @param {boolean} isNtp Whether to use the NTP as the home page.
134 * @param {string} homepage If not using NTP, use this URL.
135 * @return {string} The sub-label.
136 * @private
137 */
138 getShowHomeSubLabel_: function(isNtp, homepage) {
139 if (isNtp)
140 return this.i18n('homePageNtp');
141 if (homepage.length == 0)
142 return this.i18n('exampleDotCom');
143 return homepage;
Dan Beam 2016/03/16 00:12:14 arguable nit: return homepage || this.i18n('exampl
dschuyler 2016/03/16 21:02:07 Done.
144 },
145
146 /**
133 * @param {boolean} enabled Whether the theme reset is available. 147 * @param {boolean} enabled Whether the theme reset is available.
134 */ 148 */
135 setResetThemeEnabled: function(enabled) { 149 setResetThemeEnabled: function(enabled) {
136 this.allowResetTheme_ = enabled; 150 this.allowResetTheme_ = enabled;
137 }, 151 },
138 152
139 /** @private */ 153 /** @private */
140 onCustomizeFontsTap_: function() { 154 onCustomizeFontsTap_: function() {
141 this.$.pages.setSubpageChain(['appearance-fonts']); 155 this.$.pages.setSubpageChain(['appearance-fonts']);
142 }, 156 },
(...skipping 25 matching lines...) Expand all
168 * @param {number} percent The integer percentage of the page zoom. 182 * @param {number} percent The integer percentage of the page zoom.
169 * @private 183 * @private
170 */ 184 */
171 zoomLevelChanged_: function(percent) { 185 zoomLevelChanged_: function(percent) {
172 // The |percent| may be undefined on startup. 186 // The |percent| may be undefined on startup.
173 if (percent === undefined) 187 if (percent === undefined)
174 return; 188 return;
175 chrome.settingsPrivate.setDefaultZoomPercent(percent); 189 chrome.settingsPrivate.setDefaultZoomPercent(percent);
176 }, 190 },
177 }); 191 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/appearance_page/appearance_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698