| OLD | NEW |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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.SidebarPane} | 7 * @extends {WebInspector.SidebarPane} |
| 8 * @param {string} title | 8 * @param {string} title |
| 9 */ | 9 */ |
| 10 WebInspector.ElementsSidebarPane = function(title) | 10 WebInspector.ElementsSidebarPane = function(title) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 { | 50 { |
| 51 WebInspector.SidebarPane.prototype.wasShown.call(this); | 51 WebInspector.SidebarPane.prototype.wasShown.call(this); |
| 52 this._updateController.viewWasShown(); | 52 this._updateController.viewWasShown(); |
| 53 }, | 53 }, |
| 54 | 54 |
| 55 __proto__: WebInspector.SidebarPane.prototype | 55 __proto__: WebInspector.SidebarPane.prototype |
| 56 } | 56 } |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * @constructor | 59 * @constructor |
| 60 * @param {!WebInspector.View} view | 60 * @param {!WebInspector.Widget} view |
| 61 * @param {function(!WebInspector.Throttler.FinishCallback)} doUpdate | 61 * @param {function(!WebInspector.Throttler.FinishCallback)} doUpdate |
| 62 */ | 62 */ |
| 63 WebInspector.ElementsSidebarPane._UpdateController = function(view, doUpdate) | 63 WebInspector.ElementsSidebarPane._UpdateController = function(view, doUpdate) |
| 64 { | 64 { |
| 65 this._view = view; | 65 this._view = view; |
| 66 this._updateThrottler = new WebInspector.Throttler(100); | 66 this._updateThrottler = new WebInspector.Throttler(100); |
| 67 this._updateWhenVisible = false; | 67 this._updateWhenVisible = false; |
| 68 this._doUpdate = doUpdate; | 68 this._doUpdate = doUpdate; |
| 69 } | 69 } |
| 70 | 70 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 91 | 91 |
| 92 viewWasShown: function() | 92 viewWasShown: function() |
| 93 { | 93 { |
| 94 if (this._updateWhenVisible) | 94 if (this._updateWhenVisible) |
| 95 this.update(); | 95 this.update(); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 /** | 99 /** |
| 100 * @constructor | 100 * @constructor |
| 101 * @extends {WebInspector.View} | 101 * @extends {WebInspector.Widget} |
| 102 * @implements {WebInspector.ElementsSidebarView} | 102 * @implements {WebInspector.ElementsSidebarView} |
| 103 */ | 103 */ |
| 104 WebInspector.ThrottledElementsSidebarView = function() | 104 WebInspector.ThrottledElementsSidebarView = function() |
| 105 { | 105 { |
| 106 WebInspector.View.call(this); | 106 WebInspector.Widget.call(this); |
| 107 this._node = null; | 107 this._node = null; |
| 108 this._updateController = new WebInspector.ElementsSidebarPane._UpdateControl
ler(this, this.doUpdate.bind(this)); | 108 this._updateController = new WebInspector.ElementsSidebarPane._UpdateControl
ler(this, this.doUpdate.bind(this)); |
| 109 } | 109 } |
| 110 | 110 |
| 111 WebInspector.ThrottledElementsSidebarView.prototype = { | 111 WebInspector.ThrottledElementsSidebarView.prototype = { |
| 112 /** | 112 /** |
| 113 * @return {?WebInspector.DOMNode} | 113 * @return {?WebInspector.DOMNode} |
| 114 */ | 114 */ |
| 115 node: function() | 115 node: function() |
| 116 { | 116 { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 136 finishedCallback(); | 136 finishedCallback(); |
| 137 }, | 137 }, |
| 138 | 138 |
| 139 update: function() | 139 update: function() |
| 140 { | 140 { |
| 141 this._updateController.update(); | 141 this._updateController.update(); |
| 142 }, | 142 }, |
| 143 | 143 |
| 144 wasShown: function() | 144 wasShown: function() |
| 145 { | 145 { |
| 146 WebInspector.View.prototype.wasShown.call(this); | 146 WebInspector.Widget.prototype.wasShown.call(this); |
| 147 this._updateController.viewWasShown(); | 147 this._updateController.viewWasShown(); |
| 148 }, | 148 }, |
| 149 | 149 |
| 150 /** | 150 /** |
| 151 * @override | 151 * @override |
| 152 * @return {!WebInspector.View} | 152 * @return {!WebInspector.Widget} |
| 153 */ | 153 */ |
| 154 view: function() | 154 view: function() |
| 155 { | 155 { |
| 156 return this; | 156 return this; |
| 157 }, | 157 }, |
| 158 | 158 |
| 159 __proto__: WebInspector.View.prototype | 159 __proto__: WebInspector.Widget.prototype |
| 160 } | 160 } |
| OLD | NEW |