| Index: chrome/browser/resources/bluetooth_internals/expandable_list.js
|
| diff --git a/chrome/browser/resources/bluetooth_internals/expandable_list.js b/chrome/browser/resources/bluetooth_internals/expandable_list.js
|
| index e2d3be74e68da6c1f6b062d33d320f431c75e9c4..81de23fe1791a95e7c7ca6b4bcde4d7788641bd3 100644
|
| --- a/chrome/browser/resources/bluetooth_internals/expandable_list.js
|
| +++ b/chrome/browser/resources/bluetooth_internals/expandable_list.js
|
| @@ -31,7 +31,7 @@ cr.define('expandable_list', function() {
|
| this.briefContent_ = document.createElement('div');
|
| this.briefContent_.classList.add('brief-content');
|
| this.briefContent_.addEventListener(
|
| - 'click', this.toggleExpand_.bind(this));
|
| + 'click', this.onExpand_.bind(this));
|
| this.appendChild(this.briefContent_);
|
|
|
| this.expandedContent_ = document.createElement('div');
|
| @@ -40,11 +40,17 @@ cr.define('expandable_list', function() {
|
| },
|
|
|
| /**
|
| + * Called when the list item is expanded or collapsed.
|
| + * @param {boolean} expanded
|
| + */
|
| + onExpandInternal: function(expanded) {},
|
| +
|
| + /**
|
| * Toggles the expanded class on the item.
|
| * @private
|
| */
|
| - toggleExpand_: function() {
|
| - this.classList.toggle('expanded');
|
| + onExpand_: function() {
|
| + this.onExpandInternal(this.classList.toggle('expanded'));
|
| },
|
| };
|
|
|
| @@ -78,6 +84,7 @@ cr.define('expandable_list', function() {
|
|
|
| this.autoExpands = true;
|
| this.boundUpdateMessage_ = this.updateMessageDisplay_.bind(this);
|
| + this.setLoading(true);
|
| },
|
|
|
| /**
|
| @@ -111,6 +118,14 @@ cr.define('expandable_list', function() {
|
| },
|
|
|
| /**
|
| + * Gets the loading state of the list. Returns true if the list is loading.
|
| + * @return {boolean}
|
| + */
|
| + isLoading: function() {
|
| + return !this.spinner_.hidden;
|
| + },
|
| +
|
| + /**
|
| * Updates the display state of the empty message. If there are no items in
|
| * the data model, the empty message is displayed.
|
| */
|
|
|