| Index: chrome/browser/resources/settings/internet_page/network_summary_item.js
|
| diff --git a/chrome/browser/resources/settings/internet_page/network_summary_item.js b/chrome/browser/resources/settings/internet_page/network_summary_item.js
|
| index 27a975364ba7f0218048fed9d147f15827349556..21be79220d16c50f20058e0a1b534e28c15cbfeb 100644
|
| --- a/chrome/browser/resources/settings/internet_page/network_summary_item.js
|
| +++ b/chrome/browser/resources/settings/internet_page/network_summary_item.js
|
| @@ -14,9 +14,7 @@ Polymer({
|
| is: 'network-summary-item',
|
|
|
| properties: {
|
| - /**
|
| - * True if the list is expanded.
|
| - */
|
| + /** The expanded state of the list of networks. */
|
| expanded: {
|
| type: Boolean,
|
| value: false,
|
| @@ -24,6 +22,15 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * Whether the list has been expanded. This is used to ensure the
|
| + * iron-collapse section animates correctly.
|
| + */
|
| + wasExpanded: {
|
| + type: Boolean,
|
| + value: false,
|
| + },
|
| +
|
| + /**
|
| * The maximum height in pixels for the list of networks.
|
| */
|
| maxHeight: {
|
| @@ -101,6 +108,33 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * @return {boolean} Whether the dom-if for the network list should be true.
|
| + * The logic here is designed to allow the enclosed content to be stamped
|
| + * before it is expanded.
|
| + * @private
|
| + */
|
| + networksDomIfIsTrue_() {
|
| + if (this.expanded == this.wasExpanded)
|
| + return this.expanded;
|
| + if (this.expanded) {
|
| + Polymer.RenderStatus.afterNextRender(this, function() {
|
| + this.wasExpanded = true;
|
| + }.bind(this));
|
| + return true;
|
| + }
|
| + return this.wasExpanded;
|
| + },
|
| +
|
| + /**
|
| + * @return {boolean} Whether the iron-collapse for the network list should
|
| + * be opened.
|
| + * @private
|
| + */
|
| + networksIronCollapseIsOpened_() {
|
| + return this.expanded && this.wasExpanded;
|
| + },
|
| +
|
| + /**
|
| * @param {DeviceStateProperties} deviceState
|
| * @return {boolean}
|
| * @private
|
|
|