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 b367e9f873eb301b7717dd4ea5b403df934dbd83..c9cff05e290da15e5b67eec2f1158d664079d43e 100644 |
--- a/chrome/browser/resources/bluetooth_internals/expandable_list.js |
+++ b/chrome/browser/resources/bluetooth_internals/expandable_list.js |
@@ -40,11 +40,17 @@ cr.define('expandable_list', function() { |
}, |
/** |
+ * Called when the list item is expanded or collapsed. |
+ * @param {boolean} expanded |
+ */ |
+ onExpand: function(expanded) {}, |
+ |
+ /** |
* Toggles the expanded class on the item. |
* @private |
*/ |
toggleExpand_: function() { |
- this.classList.toggle('expanded'); |
+ this.onExpand(this.classList.toggle('expanded')); |
}, |
}; |
@@ -112,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. |
*/ |