Chromium Code Reviews| Index: chrome/browser/resources/print_preview/component.js |
| diff --git a/chrome/browser/resources/print_preview/component.js b/chrome/browser/resources/print_preview/component.js |
| index 5431b74e5cae69c4053a2d5f8632b73f85ad6c2c..74f91164f3b881fc9ef7b557c3def432725aff96 100644 |
| --- a/chrome/browser/resources/print_preview/component.js |
| +++ b/chrome/browser/resources/print_preview/component.js |
| @@ -15,8 +15,7 @@ cr.define('print_preview', function() { |
| /** |
| * Component's HTML element. |
| - * @type {Element} |
| - * @private |
| + * @private {Element} |
| */ |
| this.element_ = null; |
| @@ -24,15 +23,19 @@ cr.define('print_preview', function() { |
| /** |
| * Component's event tracker. |
| - * @type {EventTracker} |
| - * @private |
| + * @private {EventTracker} |
|
dpapad
2017/06/15 00:19:18
Since you are cleaning this up, let's also add the
rbpotter
2017/06/15 01:03:01
Done.
|
| */ |
| this.tracker_ = new EventTracker(); |
| + /** |
| + * Component's WebUI listener tracker. |
| + * @private {WebUIListenerTracker} |
|
dpapad
2017/06/15 00:19:18
Same here.
rbpotter
2017/06/15 01:03:01
Done.
|
| + */ |
| + this.listenerTracker_ = new WebUIListenerTracker(); |
| + |
| /** |
| * Child components of the component. |
| - * @type {!Array<!print_preview.Component>} |
| - * @private |
| + * @private {!Array<!print_preview.Component>} |
| */ |
| this.children_ = []; |
| } |
| @@ -50,6 +53,11 @@ cr.define('print_preview', function() { |
| return this.tracker_; |
| }, |
| + /** @return {WebUIListenerTracker} Component's Web UI listener tracker. */ |
|
dpapad
2017/06/15 00:19:18
Same here, let's add the "!".
rbpotter
2017/06/15 01:03:01
Done.
|
| + get listenerTracker() { |
| + return this.listenerTracker_; |
| + }, |
| + |
| /** |
| * @return {boolean} Whether the element of the component is already in the |
| * HTML document. |
| @@ -88,6 +96,7 @@ cr.define('print_preview', function() { |
| } |
| }); |
| this.tracker_.removeAll(); |
| + this.listenerTracker_.removeAll(); |
| this.isInDocument_ = false; |
| }, |