| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.VBox} | 7 * @extends {WebInspector.VBox} |
| 8 * @param {boolean=} isWebComponent | 8 * @param {boolean=} isWebComponent |
| 9 */ | 9 */ |
| 10 WebInspector.ThrottledWidget = function(isWebComponent) | 10 WebInspector.ThrottledWidget = function(isWebComponent) |
| 11 { | 11 { |
| 12 WebInspector.VBox.call(this, isWebComponent); | 12 WebInspector.VBox.call(this, isWebComponent); |
| 13 this._updateThrottler = new WebInspector.Throttler(100); | 13 this._updateThrottler = new WebInspector.Throttler(100); |
| 14 this._updateWhenVisible = false; | 14 this._updateWhenVisible = false; |
| 15 } | 15 }; |
| 16 | 16 |
| 17 WebInspector.ThrottledWidget.prototype = { | 17 WebInspector.ThrottledWidget.prototype = { |
| 18 /** | 18 /** |
| 19 * @protected | 19 * @protected |
| 20 * @return {!Promise<?>} | 20 * @return {!Promise<?>} |
| 21 */ | 21 */ |
| 22 doUpdate: function() | 22 doUpdate: function() |
| 23 { | 23 { |
| 24 return Promise.resolve(); | 24 return Promise.resolve(); |
| 25 }, | 25 }, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 48 * @override | 48 * @override |
| 49 */ | 49 */ |
| 50 wasShown: function() | 50 wasShown: function() |
| 51 { | 51 { |
| 52 WebInspector.VBox.prototype.wasShown.call(this); | 52 WebInspector.VBox.prototype.wasShown.call(this); |
| 53 if (this._updateWhenVisible) | 53 if (this._updateWhenVisible) |
| 54 this.update(); | 54 this.update(); |
| 55 }, | 55 }, |
| 56 | 56 |
| 57 __proto__: WebInspector.VBox.prototype | 57 __proto__: WebInspector.VBox.prototype |
| 58 } | 58 }; |
| OLD | NEW |