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.
6 * 'cr-settings-appearance-page' is the settings page containing appearance
11 * <iron-animated-pages>
12 * <cr-settings-appearance-page prefs="{{prefs}}">
13 * </cr-settings-appearance-page>
15 * </iron-animated-pages>
17 * @group Chrome Settings Elements
18 * @element cr-settings-appearance-page
21 is: 'cr-settings-appearance-page',
33 * Translated strings used in data binding.
39 homePageNtp: loadTimeData.getString('homePageNtp'),
40 openThisPage: loadTimeData.getString('openThisPage'),
47 attached: function() {
48 // Query the initial state.
49 cr.sendWithCallback('getResetThemeEnabled', undefined,
50 this.setResetThemeEnabled.bind(this));
52 // Set up the change event listener.
53 cr.addWebUIListener('reset-theme-enabled-changed',
54 this.setResetThemeEnabled.bind(this));
57 setResetThemeEnabled: function(enabled) {
58 this.$.resetTheme.disabled = !enabled;
62 openThemesGallery_: function() {
63 window.open(loadTimeData.getString('themesGalleryUrl'));
67 resetTheme_: function() {
68 chrome.send('resetTheme');