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
3 // found in the LICENSE file.
8 * 'cr-settings-appearance-page' is the settings page containing appearance
13 * <iron-animated-pages>
14 * <cr-settings-appearance-page prefs="{{prefs}}">
15 * </cr-settings-appearance-page>
17 * </iron-animated-pages>
19 * @group Chrome Settings Elements
20 * @element cr-settings-appearance-page
23 is: 'cr-settings-appearance-page',
26 attached: function() {
27 // Query the initial state.
28 cr.sendWithCallback('getResetThemeEnabled', undefined,
29 this.setResetThemeEnabled.bind(this));
31 // Set up the change event listener.
32 cr.addWebUIListener('reset-theme-enabled-changed',
33 this.setResetThemeEnabled.bind(this));
51 * Whether the page is a subpage.
69 * Title for the page header and navigation menu.
74 return loadTimeData.getString('appearancePageTitle');
79 * Name of the 'iron-icon' to show.
88 setResetThemeEnabled: function(enabled) {
89 this.$.resetTheme.disabled = !enabled;
93 openThemesGallery_: function() {
94 window.open(loadTimeData.getString('themesGalleryUrl'));
98 resetTheme_: function() {
99 chrome.send('resetTheme');