[sql] Remove _HAS_EXCEPTIONS=0 from build info.
[chromium-blink-merge.git] / chrome / browser / resources / settings / appearance_page / appearance_page.js
blob03230651dd8a99f6f0adbc7f1c2ae02da7c741d8
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.
7 /**
8 * 'cr-settings-appearance-page' is the settings page containing appearance
9 * settings.
11 * Example:
13 * <iron-animated-pages>
14 * <cr-settings-appearance-page prefs="{{prefs}}">
15 * </cr-settings-appearance-page>
16 * ... other pages ...
17 * </iron-animated-pages>
19 * @group Chrome Settings Elements
20 * @element cr-settings-appearance-page
22 Polymer({
23 is: 'cr-settings-appearance-page',
25 /** @override */
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));
36 properties: {
37 /**
38 * Preferences state.
40 prefs: {
41 type: Object,
42 notify: true,
45 /**
46 * Route for the page.
48 route: String,
50 /**
51 * Whether the page is a subpage.
53 subpage: {
54 type: Boolean,
55 value: false,
56 readOnly: true,
59 /**
60 * ID of the page.
62 PAGE_ID: {
63 type: String,
64 value: 'appearance',
65 readOnly: true,
68 /**
69 * Title for the page header and navigation menu.
71 pageTitle: {
72 type: String,
73 value: function() {
74 return loadTimeData.getString('appearancePageTitle');
78 /**
79 * Name of the 'iron-icon' to show.
81 icon: {
82 type: String,
83 value: 'home',
84 readOnly: true,
88 setResetThemeEnabled: function(enabled) {
89 this.$.resetTheme.disabled = !enabled;
92 /** @private */
93 openThemesGallery_: function() {
94 window.open(loadTimeData.getString('themesGalleryUrl'));
97 /** @private */
98 resetTheme_: function() {
99 chrome.send('resetTheme');