Index: third_party/WebKit/Source/devtools/front_end/extensions/ExtensionView.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionView.js b/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionView.js |
index 13f6899a262f0f22cb3b1665e83c6b26b686902f..e243090c937d30d7da16dbf99d03696cfc9fbc22 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionView.js |
+++ b/third_party/WebKit/Source/devtools/front_end/extensions/ExtensionView.js |
@@ -27,80 +27,82 @@ |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
- |
/** |
- * @constructor |
- * @extends {WebInspector.Widget} |
- * @param {!WebInspector.ExtensionServer} server |
- * @param {string} id |
- * @param {string} src |
- * @param {string} className |
+ * @unrestricted |
*/ |
-WebInspector.ExtensionView = function(server, id, src, className) |
-{ |
- WebInspector.Widget.call(this); |
+WebInspector.ExtensionView = class extends WebInspector.Widget { |
+ /** |
+ * @param {!WebInspector.ExtensionServer} server |
+ * @param {string} id |
+ * @param {string} src |
+ * @param {string} className |
+ */ |
+ constructor(server, id, src, className) { |
+ super(); |
this.setHideOnDetach(); |
- this.element.className = "vbox flex-auto"; // Override |
+ this.element.className = 'vbox flex-auto'; // Override |
this._server = server; |
this._id = id; |
- this._iframe = createElement("iframe"); |
- this._iframe.addEventListener("load", this._onLoad.bind(this), false); |
+ this._iframe = createElement('iframe'); |
+ this._iframe.addEventListener('load', this._onLoad.bind(this), false); |
this._iframe.src = src; |
this._iframe.className = className; |
this.setDefaultFocusedElement(this._iframe); |
this.element.appendChild(this._iframe); |
-}; |
- |
-WebInspector.ExtensionView.prototype = { |
- wasShown: function() |
- { |
- if (typeof this._frameIndex === "number") |
- this._server.notifyViewShown(this._id, this._frameIndex); |
- }, |
+ } |
- willHide: function() |
- { |
- if (typeof this._frameIndex === "number") |
- this._server.notifyViewHidden(this._id); |
- }, |
+ /** |
+ * @override |
+ */ |
+ wasShown() { |
+ if (typeof this._frameIndex === 'number') |
+ this._server.notifyViewShown(this._id, this._frameIndex); |
+ } |
- _onLoad: function() |
- { |
- var frames = /** @type {!Array.<!Window>} */ (window.frames); |
- this._frameIndex = Array.prototype.indexOf.call(frames, this._iframe.contentWindow); |
- if (this.isShowing()) |
- this._server.notifyViewShown(this._id, this._frameIndex); |
- }, |
+ /** |
+ * @override |
+ */ |
+ willHide() { |
+ if (typeof this._frameIndex === 'number') |
+ this._server.notifyViewHidden(this._id); |
+ } |
- __proto__: WebInspector.Widget.prototype |
+ _onLoad() { |
+ var frames = /** @type {!Array.<!Window>} */ (window.frames); |
+ this._frameIndex = Array.prototype.indexOf.call(frames, this._iframe.contentWindow); |
+ if (this.isShowing()) |
+ this._server.notifyViewShown(this._id, this._frameIndex); |
+ } |
}; |
/** |
- * @constructor |
- * @extends {WebInspector.VBox} |
- * @param {!WebInspector.ExtensionServer} server |
- * @param {string} id |
+ * @unrestricted |
*/ |
-WebInspector.ExtensionNotifierView = function(server, id) |
-{ |
- WebInspector.VBox.call(this); |
+WebInspector.ExtensionNotifierView = class extends WebInspector.VBox { |
+ /** |
+ * @param {!WebInspector.ExtensionServer} server |
+ * @param {string} id |
+ */ |
+ constructor(server, id) { |
+ super(); |
this._server = server; |
this._id = id; |
-}; |
- |
-WebInspector.ExtensionNotifierView.prototype = { |
- wasShown: function() |
- { |
- this._server.notifyViewShown(this._id); |
- }, |
+ } |
- willHide: function() |
- { |
- this._server.notifyViewHidden(this._id); |
- }, |
+ /** |
+ * @override |
+ */ |
+ wasShown() { |
+ this._server.notifyViewShown(this._id); |
+ } |
- __proto__: WebInspector.VBox.prototype |
+ /** |
+ * @override |
+ */ |
+ willHide() { |
+ this._server.notifyViewHidden(this._id); |
+ } |
}; |