| OLD | NEW |
| 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 * @fileoverview | 6 * @fileoverview |
| 7 * 'settings-privacy-page' is the settings page containing privacy and | 7 * 'settings-privacy-page' is the settings page containing privacy and |
| 8 * security settings. | 8 * security settings. |
| 9 */ | 9 */ |
| 10 Polymer({ | 10 Polymer({ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 <if expr="_google_chrome and not chromeos"> | 35 <if expr="_google_chrome and not chromeos"> |
| 36 /** @type {MetricsReporting} */ | 36 /** @type {MetricsReporting} */ |
| 37 metricsReporting_: Object, | 37 metricsReporting_: Object, |
| 38 </if> | 38 </if> |
| 39 | 39 |
| 40 /** @private */ | 40 /** @private */ |
| 41 showClearBrowsingDataDialog_: Boolean, | 41 showClearBrowsingDataDialog_: Boolean, |
| 42 }, | 42 }, |
| 43 | 43 |
| 44 <if expr="_google_chrome"> |
| 45 observers: [ |
| 46 'updateSpellingService_(prefs.spellcheck.use_spelling_service.value)', |
| 47 ], |
| 48 </if> |
| 49 |
| 44 ready: function() { | 50 ready: function() { |
| 45 this.ContentSettingsTypes = settings.ContentSettingsTypes; | 51 this.ContentSettingsTypes = settings.ContentSettingsTypes; |
| 46 | 52 |
| 53 <if expr="_google_chrome"> |
| 54 this.updateSpellingService_(); |
| 55 </if> |
| 56 |
| 47 <if expr="_google_chrome and not chromeos"> | 57 <if expr="_google_chrome and not chromeos"> |
| 48 var boundSetMetricsReporting = this.setMetricsReporting_.bind(this); | 58 var boundSetMetricsReporting = this.setMetricsReporting_.bind(this); |
| 49 this.addWebUIListener('metrics-reporting-change', boundSetMetricsReporting); | 59 this.addWebUIListener('metrics-reporting-change', boundSetMetricsReporting); |
| 50 | 60 |
| 51 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); | 61 var browserProxy = settings.PrivacyPageBrowserProxyImpl.getInstance(); |
| 52 browserProxy.getMetricsReporting().then(boundSetMetricsReporting); | 62 browserProxy.getMetricsReporting().then(boundSetMetricsReporting); |
| 53 </if> | 63 </if> |
| 54 }, | 64 }, |
| 55 | 65 |
| 56 /** @protected */ | 66 /** @protected */ |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 }, | 104 }, |
| 95 | 105 |
| 96 /** | 106 /** |
| 97 * @param {!MetricsReporting} metricsReporting | 107 * @param {!MetricsReporting} metricsReporting |
| 98 * @private | 108 * @private |
| 99 */ | 109 */ |
| 100 setMetricsReporting_: function(metricsReporting) { | 110 setMetricsReporting_: function(metricsReporting) { |
| 101 this.metricsReporting_ = metricsReporting; | 111 this.metricsReporting_ = metricsReporting; |
| 102 }, | 112 }, |
| 103 </if> | 113 </if> |
| 114 |
| 115 <if expr="_google_chrome"> |
| 116 /** @private */ |
| 117 updateSpellingService_: function() { |
| 118 this.$.spellingServiceToggleButton.checked = |
| 119 this.get('prefs.spellcheck.use_spelling_service.value'); |
| 120 }, |
| 121 |
| 122 /** @private */ |
| 123 onUseSpellingServiceTap_: function() { |
| 124 this.set('prefs.spellcheck.use_spelling_service.value', |
| 125 this.$.spellingServiceToggleButton.checked); |
| 126 }, |
| 127 </if> |
| 104 }); | 128 }); |
| OLD | NEW |