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..42837a36462348892707dd724c8c107e804fa728 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,19 @@ Polymer({ |
shouldShowVersion_: function(version) { |
return version.length > 0; |
}, |
+ |
+ /** @private */ |
+ onChangeChannelTap_: function() { |
+ this.showChannelSwitcherDialog_ = true; |
+ // Async to wait for dialog to appear in the DOM. |
+ this.async(function() { |
+ 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)); |
+ }, |
}); |