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.Widget} | 7 * @extends {WebInspector.Widget} |
| 8 * @param {boolean=} isWebComponent |
8 */ | 9 */ |
9 WebInspector.ThrottledWidget = function() | 10 WebInspector.ThrottledWidget = function(isWebComponent) |
10 { | 11 { |
11 WebInspector.Widget.call(this); | 12 WebInspector.Widget.call(this, isWebComponent); |
12 this._updateThrottler = new WebInspector.Throttler(100); | 13 this._updateThrottler = new WebInspector.Throttler(100); |
13 this._updateWhenVisible = false; | 14 this._updateWhenVisible = false; |
14 } | 15 } |
15 | 16 |
16 WebInspector.ThrottledWidget.prototype = { | 17 WebInspector.ThrottledWidget.prototype = { |
17 /** | 18 /** |
18 * @protected | 19 * @protected |
19 * @return {!Promise.<?>} | 20 * @return {!Promise.<?>} |
20 */ | 21 */ |
21 doUpdate: function() | 22 doUpdate: function() |
(...skipping 28 matching lines...) Expand all Loading... |
50 */ | 51 */ |
51 wasShown: function() | 52 wasShown: function() |
52 { | 53 { |
53 WebInspector.Widget.prototype.wasShown.call(this); | 54 WebInspector.Widget.prototype.wasShown.call(this); |
54 if (this._updateWhenVisible) | 55 if (this._updateWhenVisible) |
55 this.update(); | 56 this.update(); |
56 }, | 57 }, |
57 | 58 |
58 __proto__: WebInspector.Widget.prototype | 59 __proto__: WebInspector.Widget.prototype |
59 } | 60 } |
OLD | NEW |