Index: chrome/browser/resources/settings/about_page/update_warning_dialog.js |
diff --git a/chrome/browser/resources/settings/about_page/update_warning_dialog.js b/chrome/browser/resources/settings/about_page/update_warning_dialog.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..775abee874a0cfc9ac5c60b33201399873d83269 |
--- /dev/null |
+++ b/chrome/browser/resources/settings/about_page/update_warning_dialog.js |
@@ -0,0 +1,48 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
michaelpg
2017/04/04 00:44:52
2017 :-)
weidongg
2017/04/04 04:25:11
Done.
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * @fileoverview 'settings-update-warning-dialog' is a component warning the |
+ * user about update over mobile data. By clicking 'Continue', the user |
+ * agrees to download update using mobile data. |
+ */ |
+Polymer({ |
+ is: 'settings-update-warning-dialog', |
+ |
+ behaviors: [I18nBehavior], |
+ |
+ properties: { |
michaelpg
2017/04/04 00:44:52
omit empty properties object
weidongg
2017/04/04 04:25:12
Done.
|
+ }, |
+ |
+ /** @override */ |
+ ready: function() { |
+ this.browserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); |
+ }, |
+ |
+ /** @override */ |
+ attached: function() { |
+ this.$.dialog.showModal(); |
+ }, |
+ |
+ /** @private */ |
+ onCancelTap_: function() { |
+ //TODO(weidongg): implement the real behaviors here. |
michaelpg
2017/04/04 00:44:52
nit here and below: "// TODO(..." (space after //)
weidongg
2017/04/04 04:25:11
Done.
|
+ this.$.dialog.close(); |
+ }, |
+ |
+ /** @private */ |
+ onContinueTap_: function() { |
+ //TODO(weidongg): implement the real behaviors here. |
+ this.$.dialog.close(); |
+ }, |
+ |
+ /** |
+ * @param {string} updateSizeMb size of the update in megabytes. |
michaelpg
2017/04/04 00:44:52
nit: capitalize Size
weidongg
2017/04/04 04:25:11
Done.
|
+ * @private |
+ */ |
+ setUpdateWarningMessage: function(updateSizeMb) { |
+ this.$$("#update-warning-message").innerHTML = |
+ this.i18n("aboutUpdateWarningMessage", updateSizeMb); |
michaelpg
2017/04/04 00:44:52
4-space indent (looks like 5)
weidongg
2017/04/04 04:25:11
Done.
|
+ }, |
+}); |