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

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: Indentation nits, after merging. 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..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));
+ },
});

Powered by Google App Engine
This is Rietveld 408576698