summaryrefslogtreecommitdiff
path: root/chromium/ui/webui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-02-15 14:18:00 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-02-15 14:00:37 +0000
commit66a2147d838e293f4a5db7711c8eba4e6faaaf0f (patch)
tree61ad99912355f5b6cc603d9b1dfadd77b950ce98 /chromium/ui/webui
parentda51f56cc21233c2d30f0fe0d171727c3102b2e0 (diff)
downloadqtwebengine-chromium-66a2147d838e293f4a5db7711c8eba4e6faaaf0f.tar.gz
BASELINE: Update Chromium to 65.0.3325.75
Change-Id: I5485bc5c111539356276457516584fa5737f07d8 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/ui/webui')
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html3
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js15
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_ip_config.js7
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js15
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html16
-rw-r--r--chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.js29
-rw-r--r--chromium/ui/webui/resources/cr_components/cr_components_resources.grdp5
7 files changed, 70 insertions, 20 deletions
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html
index e69e3779d34..5902a64a662 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.html
@@ -155,7 +155,8 @@
</template>
<!-- Share (WiFi and WiMAX) -->
- <template is="dom-if" if="[[shareIsVisible_(type)]]">
+ <template is="dom-if"
+ if="[[shareIsVisible_(guid, type, networkProperties)]]">
<div class="property-box">
<div id="shareLabel" class="start">[[i18n('networkConfigShare')]]</div>
<paper-toggle-button id="share" checked="{{shareNetwork_}}"
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js
index 89d0f3cf998..26c479f7e0b 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_config.js
@@ -365,7 +365,7 @@ Polymer({
this.error_ = '';
var propertiesToSet = this.getPropertiesToSet_();
- if (!this.guid || this.getSource_() == CrOnc.Source.NONE) {
+ if (this.getSource_() == CrOnc.Source.NONE) {
// New non VPN network configurations default to 'AutoConnect' unless
// prohibited by policy.
var prohibitAutoConnect = this.globalPolicy &&
@@ -411,6 +411,8 @@ Polymer({
* @return {!CrOnc.Source}
*/
getSource_: function() {
+ if (!this.guid)
+ return CrOnc.Source.NONE;
var source = this.networkProperties.Source;
return source ? /** @type {!CrOnc.Source} */ (source) : CrOnc.Source.NONE;
},
@@ -543,9 +545,9 @@ Polymer({
/** @private */
setShareNetwork_: function() {
- if (this.guid) {
+ var source = this.getSource_();
+ if (source != CrOnc.Source.NONE) {
// Configured networks can not change whether they are shared.
- var source = this.getSource_();
this.shareNetwork_ =
source == CrOnc.Source.DEVICE || source == CrOnc.Source.DEVICE_POLICY;
return;
@@ -1019,7 +1021,7 @@ Polymer({
* @private
*/
shareIsVisible_: function() {
- return !this.guid &&
+ return this.getSource_() == CrOnc.Source.NONE &&
(this.type == CrOnc.Type.WI_FI || this.type == CrOnc.Type.WI_MAX);
},
@@ -1179,8 +1181,11 @@ Polymer({
setVpnIPsecProperties_: function(propertiesToSet) {
var vpn = propertiesToSet.VPN;
assert(vpn.IPsec);
- if (vpn.IPsec.AuthenticationType == CrOnc.IPsecAuthenticationType.CERT)
+ if (vpn.IPsec.AuthenticationType == CrOnc.IPsecAuthenticationType.CERT) {
+ vpn.IPsec.ClientCertType = 'PKCS11Id';
vpn.IPsec.ClientCertPKCS11Id = this.getUserCertPkcs11Id_();
+ vpn.IPsec.ServerCAPEMs = this.getServerCaPems_();
+ }
vpn.IPsec.IKEVersion = 1;
vpn.IPsec.SaveCredentials = this.vpnSaveCredentials_;
vpn.L2TP.SaveCredentials = this.vpnSaveCredentials_;
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_ip_config.js b/chromium/ui/webui/resources/cr_components/chromeos/network/network_ip_config.js
index 617486c40fe..de442adbaf3 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_ip_config.js
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_ip_config.js
@@ -101,8 +101,11 @@ Polymer({
CrOnc.getIPConfigForType(properties, CrOnc.IPType.IPV4));
var ipv6 = this.getIPConfigUIProperties_(
CrOnc.getIPConfigForType(properties, CrOnc.IPType.IPV6));
- if (ipv4 && !ipv6)
- ipv6 = {IPAddress: this.i18n('loading')};
+ if (properties.ConnectionState == CrOnc.ConnectionState.CONNECTED &&
+ ipv4 && ipv4.IPAddress) {
+ ipv6 = ipv6 || {};
+ ipv6.IPAddress = ipv6.IPAddress || this.i18n('loading');
+ }
this.ipConfig_ = {ipv4: ipv4, ipv6: ipv6};
} else {
this.ipConfig_ = null;
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js b/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js
index 82f4e685bfe..b9e9cf47da5 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_nameservers.js
@@ -99,6 +99,7 @@ Polymer({
}
} else {
type = 'automatic';
+ nameservers = this.clearEmptyNameServers_(nameservers);
}
this.setNameservers_(type, nameservers, false /* send */);
},
@@ -213,13 +214,14 @@ Polymer({
field: 'NameServers',
value: this.GOOGLE_NAMESERVERS,
});
- } else {
- // automatic
+ } else { // type == automatic
// If not connected, properties will clear. Otherwise they may or may not
// change so leave them as-is.
if (this.networkProperties.ConnectionState !=
CrOnc.ConnectionState.CONNECTED) {
this.nameservers_ = [];
+ } else {
+ this.nameservers_ = this.clearEmptyNameServers_(this.nameservers_);
}
this.fire('nameservers-change', {
field: 'NameServersConfigType',
@@ -227,4 +229,13 @@ Polymer({
});
}
},
+
+ /**
+ * @param {!Array<string>} nameservers
+ * @return {!Array<string>}
+ * @private
+ */
+ clearEmptyNameServers_: function(nameservers) {
+ return nameservers.filter((nameserver) => !!nameserver);
+ },
});
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html b/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html
index b04b3732c50..45101bfbc39 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html
@@ -90,7 +90,7 @@
on-close="onEnterPinDialogClose_">
<div slot="title">[[i18n('networkSimEnterPinTitle')]]</div>
<div slot="body">
- <network-config-input id="enterPin" password autofocus
+ <network-config-input id="enterPin" password
label="[[i18n('networkSimEnterPin')]]">
<iron-a11y-keys keys="enter" on-keys-pressed="sendEnterPin_">
</iron-a11y-keys>
@@ -100,7 +100,7 @@
</div>
</div>
<div slot="button-container">
- <paper-button on-tap="sendEnterPin_">
+ <paper-button on-tap="sendEnterPin_" disabled="[[inProgress_]]">
[[i18n('networkSimEnter')]]
</paper-button>
</div>
@@ -111,7 +111,7 @@
on-close="onChangePinDialogClose_">
<div slot="title">[[i18n('networkSimChangePinTitle')]]</div>
<div slot="body">
- <network-config-input id="changePinOld" password autofocus
+ <network-config-input id="changePinOld" password
label="[[i18n('networkSimEnterOldPin')]]">
</network-config-input>
<network-config-input id="changePinNew1" password
@@ -127,7 +127,7 @@
</div>
</div>
<div slot="button-container">
- <paper-button on-tap="sendChangePin_">
+ <paper-button on-tap="sendChangePin_" disabled="[[inProgress_]]">
[[i18n('networkSimChange')]]
</paper-button>
</div>
@@ -138,7 +138,7 @@
on-close="onUnlockPinDialogClose_">
<div slot="title">[[i18n('networkSimLockedTitle')]]</div>
<div slot="body">
- <network-config-input id="unlockPin" password autofocus
+ <network-config-input id="unlockPin" password
label="[[i18n('networkSimEnterPin')]]">
<iron-a11y-keys keys="enter" on-keys-pressed="sendUnlockPin_">
</iron-a11y-keys>
@@ -148,7 +148,7 @@
</div>
</div>
<div slot="button-container">
- <paper-button on-tap="sendUnlockPin_">
+ <paper-button on-tap="sendUnlockPin_" disabled="[[inProgress_]]">
[[i18n('networkSimUnlock')]]
</paper-button>
</div>
@@ -162,7 +162,7 @@
<div>
Enter the 8-digit PIN Unblocking Key provided by your carrier
</div>
- <network-config-input id="unlockPuk" password autofocus
+ <network-config-input id="unlockPuk" password
label="[[i18n('networkSimEnterPuk')]]">
</network-config-input>
<network-config-input id="unlockPin1" password
@@ -181,7 +181,7 @@
</div>
</div>
<div slot="button-container">
- <paper-button on-tap="sendUnlockPuk_">
+ <paper-button on-tap="sendUnlockPuk_" disabled="[[inProgress_]]">
[[i18n('networkSimUnlock')]]
</paper-button>
</div>
diff --git a/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.js b/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.js
index ed702897da8..668656ec4c4 100644
--- a/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.js
+++ b/chromium/ui/webui/resources/cr_components/chromeos/network/network_siminfo.js
@@ -63,6 +63,15 @@ Polymer({
},
/**
+ * Set to true when a SIM operation is in progress. Used to disable buttons.
+ * @private
+ */
+ inProgress_: {
+ type: Boolean,
+ value: false,
+ },
+
+ /**
* Set to an ErrorType value after an incorrect PIN or PUK entry.
* @private {ErrorType}
*/
@@ -178,6 +187,9 @@ Polymer({
this.error_ = ErrorType.NONE;
this.$.enterPin.value = '';
this.$.enterPinDialog.showModal();
+ requestAnimationFrame(() => {
+ this.$.enterPin.focus();
+ });
},
/**
@@ -197,7 +209,9 @@ Polymer({
currentPin: pin,
requirePin: this.sendSimLockEnabled_,
});
+ this.inProgress_ = true;
this.networkingPrivate.setCellularSimState(guid, simState, () => {
+ this.inProgress_ = false;
if (chrome.runtime.lastError) {
this.error_ = ErrorType.INCORRECT_PIN;
this.$.enterPin.inputElement.select();
@@ -223,6 +237,9 @@ Polymer({
this.$.changePinNew1.value = '';
this.$.changePinNew2.value = '';
this.$.changePinDialog.showModal();
+ requestAnimationFrame(() => {
+ this.$.changePinOld.focus();
+ });
},
/**
@@ -242,7 +259,9 @@ Polymer({
currentPin: this.$.changePinOld.value,
newPin: newPin
});
+ this.inProgress_ = true;
this.networkingPrivate.setCellularSimState(guid, simState, () => {
+ this.inProgress_ = false;
if (chrome.runtime.lastError) {
this.error_ = ErrorType.INCORRECT_PIN;
this.$.changePinOld.inputElement.select();
@@ -280,7 +299,9 @@ Polymer({
if (!this.validatePin_(pin))
return;
+ this.inProgress_ = true;
this.networkingPrivate.unlockCellularSim(guid, pin, '', () => {
+ this.inProgress_ = false;
if (chrome.runtime.lastError) {
this.error_ = ErrorType.INCORRECT_PIN;
this.$.unlockPin.inputElement.select();
@@ -297,6 +318,9 @@ Polymer({
this.error_ = ErrorType.NONE;
this.$.unlockPin.value = '';
this.$.unlockPinDialog.showModal();
+ requestAnimationFrame(() => {
+ this.$.unlockPin.focus();
+ });
},
/** @private */
@@ -306,6 +330,9 @@ Polymer({
this.$.unlockPin1.value = '';
this.$.unlockPin2.value = '';
this.$.unlockPukDialog.showModal();
+ requestAnimationFrame(() => {
+ this.$.unlockPuk.focus();
+ });
},
/**
@@ -323,7 +350,9 @@ Polymer({
if (!this.validatePin_(pin, this.$.unlockPin2.value))
return;
+ this.inProgress_ = true;
this.networkingPrivate.unlockCellularSim(guid, pin, puk, () => {
+ this.inProgress_ = false;
if (chrome.runtime.lastError) {
this.error_ = ErrorType.INCORRECT_PUK;
this.$.unlockPuk.inputElement.select();
diff --git a/chromium/ui/webui/resources/cr_components/cr_components_resources.grdp b/chromium/ui/webui/resources/cr_components/cr_components_resources.grdp
index 3b4e57cf3d1..1e198676684 100644
--- a/chromium/ui/webui/resources/cr_components/cr_components_resources.grdp
+++ b/chromium/ui/webui/resources/cr_components/cr_components_resources.grdp
@@ -96,8 +96,9 @@
type="chrome_html"
compress="gzip" />
</if>
- <if expr="chromeos">
- <!-- Chrome OS Custom Elements -->
+ <if expr="chromeos and not optimize_webui">
+ <!-- Chrome OS Custom Elements. When optimize_webui is true these are -->
+ <!-- vulcanized and are not included individually. -->
<structure name="IDR_WEBUI_CHROMEOS_BLUETOOTH_DIALOG_HTML"
file="cr_components/chromeos/bluetooth_dialog.html"
type="chrome_html"