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

Unified Diff: chrome/browser/resources/settings/internet_page/internet_detail_page.js

Issue 2956433003: Settings: Network: Support choose mobile network (Closed)
Patch Set: Rebase Created 3 years, 6 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/internet_page/internet_detail_page.js
diff --git a/chrome/browser/resources/settings/internet_page/internet_detail_page.js b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
index 0a79a415eaf1af034dee11b5812fd847e16e769b..a56d342016bea85b30ee299dd28f2f543735dfb4 100644
--- a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
+++ b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
@@ -615,6 +615,12 @@ Polymer({
this.networkingPrivate.startActivate(this.guid);
},
+ /** @private */
+ onChooseMobileTap_: function() {
+ // TODO(stevenjb): Integrate ChooseMobileNetworkDialog with WebUI.
+ chrome.send('addNetwork', [this.networkProperties.Type]);
+ },
+
/** @const {string} */
CR_EXPAND_BUTTON_TAG: 'CR-EXPAND-BUTTON',
@@ -980,16 +986,25 @@ Polymer({
return this.isRememberedOrConnected_(networkProperties);
},
+ /**
+ * @param {!CrOnc.NetworkProperties} networkProperties
+ * @return {boolean}
+ * @private
+ */
+ showCellularChooseNetwork_: function(networkProperties) {
+ return networkProperties.Type == CrOnc.Type.CELLULAR &&
+ !!this.get('Cellular.SupportNetworkScan', this.networkProperties);
+ },
+
/**
* @param {!CrOnc.NetworkProperties} networkProperties
* @return {boolean}
* @private
*/
showCellularSim_: function(networkProperties) {
- if (networkProperties.Type != 'Cellular' || !networkProperties.Cellular) {
- return false;
- }
- return networkProperties.Cellular.Family == 'GSM';
+ return networkProperties.Type == CrOnc.Type.CELLULAR &&
+ this.get('Cellular.Family', this.networkProperties) ==
+ CrOnc.NetworkTechnology.GSM;
},
/**

Powered by Google App Engine
This is Rietveld 408576698