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

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

Issue 2210933004: Settings Router Refactor: Kill settings-router. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix merge Created 4 years, 4 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 *
11 * <iron-animated-pages> 11 * <iron-animated-pages>
12 * <settings-appearance-page prefs="{{prefs}}"> 12 * <settings-appearance-page prefs="{{prefs}}">
13 * </settings-appearance-page> 13 * </settings-appearance-page>
14 * ... other pages ... 14 * ... other pages ...
15 * </iron-animated-pages> 15 * </iron-animated-pages>
16 */ 16 */
17 Polymer({ 17 Polymer({
18 is: 'settings-appearance-page', 18 is: 'settings-appearance-page',
19 19
20 behaviors: [I18nBehavior], 20 behaviors: [I18nBehavior],
21 21
22 properties: { 22 properties: {
23 /**
24 * The current active route.
25 */
26 currentRoute: {
27 notify: true,
28 type: Object,
29 },
30
31 /** @private {!settings.AppearanceBrowserProxy} */ 23 /** @private {!settings.AppearanceBrowserProxy} */
32 browserProxy_: Object, 24 browserProxy_: Object,
33 25
34 /** 26 /**
35 * Preferences state. 27 * Preferences state.
36 */ 28 */
37 prefs: { 29 prefs: {
38 type: Object, 30 type: Object,
39 notify: true, 31 notify: true,
40 }, 32 },
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 openWallpaperManager_: function() { 173 openWallpaperManager_: function() {
182 this.browserProxy_.openWallpaperManager(); 174 this.browserProxy_.openWallpaperManager();
183 }, 175 },
184 </if> 176 </if>
185 177
186 /** @private */ 178 /** @private */
187 resetTheme_: function() { 179 resetTheme_: function() {
188 this.browserProxy_.resetTheme(); 180 this.browserProxy_.resetTheme();
189 }, 181 },
190 182
191 /** @private */
192 showFontsPage_: function() {
193 return this.currentRoute == settings.Route.FONTS;
194 },
195
196 /** 183 /**
197 * @param {string} themeId The theme ID. 184 * @param {string} themeId The theme ID.
198 * @private 185 * @private
199 */ 186 */
200 themeChanged_: function(themeId) { 187 themeChanged_: function(themeId) {
201 if (themeId) { 188 if (themeId) {
202 chrome.management.get(themeId, 189 chrome.management.get(themeId,
203 function(info) { 190 function(info) {
204 this.themeSublabel_ = info.name; 191 this.themeSublabel_ = info.name;
205 }.bind(this)); 192 }.bind(this));
(...skipping 23 matching lines...) Expand all
229 216
230 /** 217 /**
231 * @param {boolean} bookmarksBarVisible if bookmarks bar option is visible. 218 * @param {boolean} bookmarksBarVisible if bookmarks bar option is visible.
232 * @return {string} 'first' if the argument is false or empty otherwise. 219 * @return {string} 'first' if the argument is false or empty otherwise.
233 * @private 220 * @private
234 */ 221 */
235 getFirst_: function(bookmarksBarVisible) { 222 getFirst_: function(bookmarksBarVisible) {
236 return !bookmarksBarVisible ? 'first' : ''; 223 return !bookmarksBarVisible ? 'first' : '';
237 } 224 }
238 }); 225 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698