| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 this._iframe = createElement("iframe"); | 47 this._iframe = createElement("iframe"); |
| 48 this._iframe.addEventListener("load", this._onLoad.bind(this), false); | 48 this._iframe.addEventListener("load", this._onLoad.bind(this), false); |
| 49 this._iframe.src = src; | 49 this._iframe.src = src; |
| 50 this._iframe.className = className; | 50 this._iframe.className = className; |
| 51 this.setDefaultFocusedElement(this._iframe); | 51 this.setDefaultFocusedElement(this._iframe); |
| 52 | 52 |
| 53 this.element.appendChild(this._iframe); | 53 this.element.appendChild(this._iframe); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 WebInspector.ExtensionView.prototype = { | 56 WebInspector.ExtensionView.prototype = { |
| 57 /** |
| 58 * @override |
| 59 */ |
| 57 wasShown: function() | 60 wasShown: function() |
| 58 { | 61 { |
| 59 if (typeof this._frameIndex === "number") | 62 if (typeof this._frameIndex === "number") |
| 60 this._server.notifyViewShown(this._id, this._frameIndex); | 63 this._server.notifyViewShown(this._id, this._frameIndex); |
| 61 }, | 64 }, |
| 62 | 65 |
| 66 /** |
| 67 * @override |
| 68 */ |
| 63 willHide: function() | 69 willHide: function() |
| 64 { | 70 { |
| 65 if (typeof this._frameIndex === "number") | 71 if (typeof this._frameIndex === "number") |
| 66 this._server.notifyViewHidden(this._id); | 72 this._server.notifyViewHidden(this._id); |
| 67 }, | 73 }, |
| 68 | 74 |
| 69 _onLoad: function() | 75 _onLoad: function() |
| 70 { | 76 { |
| 71 var frames = /** @type {!Array.<!Window>} */ (window.frames); | 77 var frames = /** @type {!Array.<!Window>} */ (window.frames); |
| 72 this._frameIndex = Array.prototype.indexOf.call(frames, this._iframe.con
tentWindow); | 78 this._frameIndex = Array.prototype.indexOf.call(frames, this._iframe.con
tentWindow); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 85 */ | 91 */ |
| 86 WebInspector.ExtensionNotifierView = function(server, id) | 92 WebInspector.ExtensionNotifierView = function(server, id) |
| 87 { | 93 { |
| 88 WebInspector.VBox.call(this); | 94 WebInspector.VBox.call(this); |
| 89 | 95 |
| 90 this._server = server; | 96 this._server = server; |
| 91 this._id = id; | 97 this._id = id; |
| 92 }; | 98 }; |
| 93 | 99 |
| 94 WebInspector.ExtensionNotifierView.prototype = { | 100 WebInspector.ExtensionNotifierView.prototype = { |
| 101 /** |
| 102 * @override |
| 103 */ |
| 95 wasShown: function() | 104 wasShown: function() |
| 96 { | 105 { |
| 97 this._server.notifyViewShown(this._id); | 106 this._server.notifyViewShown(this._id); |
| 98 }, | 107 }, |
| 99 | 108 |
| 109 /** |
| 110 * @override |
| 111 */ |
| 100 willHide: function() | 112 willHide: function() |
| 101 { | 113 { |
| 102 this._server.notifyViewHidden(this._id); | 114 this._server.notifyViewHidden(this._id); |
| 103 }, | 115 }, |
| 104 | 116 |
| 105 __proto__: WebInspector.VBox.prototype | 117 __proto__: WebInspector.VBox.prototype |
| 106 }; | 118 }; |
| OLD | NEW |