OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 'settings-about-page' contains version and OS related | 6 * @fileoverview 'settings-about-page' contains version and OS related |
7 * information. | 7 * information. |
8 */ | 8 */ |
9 Polymer({ | 9 Polymer({ |
10 is: 'settings-about-page', | 10 is: 'settings-about-page', |
(...skipping 17 matching lines...) Expand all Loading... |
28 /** @private {!BrowserChannel} */ | 28 /** @private {!BrowserChannel} */ |
29 currentChannel_: String, | 29 currentChannel_: String, |
30 | 30 |
31 /** @private {!BrowserChannel} */ | 31 /** @private {!BrowserChannel} */ |
32 targetChannel_: String, | 32 targetChannel_: String, |
33 | 33 |
34 /** @private {?RegulatoryInfo} */ | 34 /** @private {?RegulatoryInfo} */ |
35 regulatoryInfo_: Object, | 35 regulatoryInfo_: Object, |
36 </if> | 36 </if> |
37 | 37 |
| 38 <if expr="_google_chrome and is_macosx"> |
| 39 /** @private {!PromoteUpdaterStatus} */ |
| 40 promoteUpdaterStatus_: Object, |
| 41 </if> |
| 42 |
38 /** @private {!{obsolete: boolean, endOfLine: boolean}} */ | 43 /** @private {!{obsolete: boolean, endOfLine: boolean}} */ |
39 obsoleteSystemInfo_: { | 44 obsoleteSystemInfo_: { |
40 type: Object, | 45 type: Object, |
41 value: function() { | 46 value: function() { |
42 return { | 47 return { |
43 obsolete: loadTimeData.getBoolean('aboutObsoleteNowOrSoon'), | 48 obsolete: loadTimeData.getBoolean('aboutObsoleteNowOrSoon'), |
44 endOfLine: loadTimeData.getBoolean('aboutObsoleteEndOfTheLine'), | 49 endOfLine: loadTimeData.getBoolean('aboutObsoleteEndOfTheLine'), |
45 }; | 50 }; |
46 }, | 51 }, |
47 }, | 52 }, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 <if expr="not chromeos"> | 128 <if expr="not chromeos"> |
124 this.startListening_(); | 129 this.startListening_(); |
125 </if> | 130 </if> |
126 }, | 131 }, |
127 | 132 |
128 /** @private */ | 133 /** @private */ |
129 startListening_: function() { | 134 startListening_: function() { |
130 this.addWebUIListener( | 135 this.addWebUIListener( |
131 'update-status-changed', | 136 'update-status-changed', |
132 this.onUpdateStatusChanged_.bind(this)); | 137 this.onUpdateStatusChanged_.bind(this)); |
| 138 <if expr="_google_chrome and is_macosx"> |
| 139 this.addWebUIListener( |
| 140 'promotion-state-changed', |
| 141 this.onPromoteUpdaterStatusChanged_.bind(this)); |
| 142 </if> |
133 this.aboutBrowserProxy_.refreshUpdateStatus(); | 143 this.aboutBrowserProxy_.refreshUpdateStatus(); |
134 }, | 144 }, |
135 | 145 |
136 /** | 146 /** |
137 * @param {!UpdateStatusChangedEvent} event | 147 * @param {!UpdateStatusChangedEvent} event |
138 * @private | 148 * @private |
139 */ | 149 */ |
140 onUpdateStatusChanged_: function(event) { | 150 onUpdateStatusChanged_: function(event) { |
141 <if expr="chromeos"> | 151 <if expr="chromeos"> |
142 if (event.status == UpdateStatus.CHECKING) | 152 if (event.status == UpdateStatus.CHECKING) |
143 this.hasCheckedForUpdates_ = true; | 153 this.hasCheckedForUpdates_ = true; |
144 </if> | 154 </if> |
145 this.currentUpdateStatusEvent_ = event; | 155 this.currentUpdateStatusEvent_ = event; |
146 }, | 156 }, |
147 | 157 |
| 158 <if expr="_google_chrome and is_macosx"> |
| 159 /** |
| 160 * @param {!PromoteUpdaterStatus} status |
| 161 * @private |
| 162 */ |
| 163 onPromoteUpdaterStatusChanged_: function(status) { |
| 164 this.promoteUpdaterStatus_ = status; |
| 165 }, |
| 166 |
| 167 /** |
| 168 * If #promoteUpdater isn't disabled, trigger update promotion. |
| 169 * @private |
| 170 */ |
| 171 onPromoteUpdaterTap_: function() { |
| 172 // This is necessary because #promoteUpdater is not a button, so by default |
| 173 // disable doesn't do anything. |
| 174 if (this.promoteUpdaterStatus_.disabled) |
| 175 return; |
| 176 this.aboutBrowserProxy_.promoteUpdater(); |
| 177 }, |
| 178 |
| 179 /** |
| 180 * @param {!Event} event |
| 181 * @private |
| 182 */ |
| 183 onLearnMoreTap_: function(event) { |
| 184 // Stop the propagation of events, so that clicking on links inside |
| 185 // actionable items won't trigger action. |
| 186 event.stopPropagation(); |
| 187 }, |
| 188 </if> |
| 189 |
148 /** @private */ | 190 /** @private */ |
149 onHelpTap_: function() { | 191 onHelpTap_: function() { |
150 this.aboutBrowserProxy_.openHelpPage(); | 192 this.aboutBrowserProxy_.openHelpPage(); |
151 }, | 193 }, |
152 | 194 |
153 /** @private */ | 195 /** @private */ |
154 onRelaunchTap_: function() { | 196 onRelaunchTap_: function() { |
155 this.lifetimeBrowserProxy_.relaunch(); | 197 this.lifetimeBrowserProxy_.relaunch(); |
156 }, | 198 }, |
157 | 199 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 }); | 396 }); |
355 }, | 397 }, |
356 | 398 |
357 <if expr="_google_chrome"> | 399 <if expr="_google_chrome"> |
358 /** @private */ | 400 /** @private */ |
359 onReportIssueTap_: function() { | 401 onReportIssueTap_: function() { |
360 this.aboutBrowserProxy_.openFeedbackDialog(); | 402 this.aboutBrowserProxy_.openFeedbackDialog(); |
361 }, | 403 }, |
362 </if> | 404 </if> |
363 }); | 405 }); |
OLD | NEW |