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