Chromium Code Reviews| 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..81a1384908dea73cb81bc36f916477a796222f6b 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() { |
|
dpapad
2017/01/17 20:01:01
Things need to be renamed. The event listener "tog
mbrunson
2017/01/17 21:05:49
Done.
|
| - this.classList.toggle('expanded'); |
| + this.onExpand(this.classList.toggle('expanded')); |
| }, |
| }; |
| @@ -111,6 +117,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. |
| */ |