OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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. |
| 4 |
| 5 /** |
| 6 * @fileoverview 'settings-update-warning-dialog' is a component warning the |
| 7 * user about update over mobile data. By clicking 'Continue', the user |
| 8 * agrees to download update using mobile data. |
| 9 */ |
| 10 Polymer({ |
| 11 is: 'settings-update-warning-dialog', |
| 12 |
| 13 behaviors: [I18nBehavior], |
| 14 |
| 15 /** @override */ |
| 16 ready: function() { |
| 17 this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); |
| 18 }, |
| 19 |
| 20 /** @override */ |
| 21 attached: function() { |
| 22 this.$.dialog.showModal(); |
| 23 }, |
| 24 |
| 25 /** @private */ |
| 26 onCancelTap_: function() { |
| 27 // TODO(weidongg): implement the real behaviors here. |
| 28 this.$.dialog.close(); |
| 29 }, |
| 30 |
| 31 /** @private */ |
| 32 onContinueTap_: function() { |
| 33 // TODO(weidongg): implement the real behaviors here. |
| 34 this.$.dialog.close(); |
| 35 }, |
| 36 |
| 37 /** |
| 38 * @param {string} updateSizeMb Size of the update in megabytes. |
| 39 * @private |
| 40 */ |
| 41 setUpdateWarningMessage: function(updateSizeMb) { |
| 42 this.$$("#update-warning-message").innerHTML = |
| 43 this.i18n("aboutUpdateWarningMessage", updateSizeMb); |
| 44 }, |
| 45 }); |
OLD | NEW |