Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: chrome/browser/resources/settings/about_page/detailed_build_info.js

Issue 2011703002: MD Settings: About page, hooking up channel switcher dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@about_regulatory_info
Patch Set: Nit. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/about_page/detailed_build_info.js
diff --git a/chrome/browser/resources/settings/about_page/detailed_build_info.js b/chrome/browser/resources/settings/about_page/detailed_build_info.js
index 613d650660f589f129c60263c1b6bf4b0165f679..acb722e5baae46634e37cbb72714643ad8b7a5af 100644
--- a/chrome/browser/resources/settings/about_page/detailed_build_info.js
+++ b/chrome/browser/resources/settings/about_page/detailed_build_info.js
@@ -18,6 +18,17 @@ Polymer({
/** @private */
currentlyOnChannelText_: String,
+
+ /** @private */
+ showChannelSwitcherDialog_: Boolean,
+
+ /** @private */
+ canChangeChannel_: {
+ type: Boolean,
+ value: function() {
+ return loadTimeData.getBoolean('aboutCanChangeChannel');
+ },
+ },
},
/** @override */
@@ -43,4 +54,18 @@ Polymer({
shouldShowVersion_: function(version) {
return version.length > 0;
},
+
+ /** @private */
+ onChangeChannelTap_: function() {
+ this.showChannelSwitcherDialog_ = true;
+ this.async(function() {
dschuyler 2016/05/27 22:16:21 Please add a comment above this.async to explain w
dpapad 2016/05/27 23:32:18 Done.
+ var dialog = this.$$('settings-channel-switcher-dialog');
+ // Register listener to detect when the dialog is closed. Flip the boolean
+ // once closed to force a restamp next time it is shown such that the
+ // previous dialog's contents are cleared.
+ dialog.addEventListener('iron-overlay-closed', function() {
+ this.showChannelSwitcherDialog_ = false;
+ }.bind(this));
+ }.bind(this));
+ },
});

Powered by Google App Engine
This is Rietveld 408576698