| 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 var DocumentNatives = requireNative('document_natives'); | 5 var DocumentNatives = requireNative('document_natives'); |
| 6 var ExtensionOptionsEvents = | 6 var ExtensionOptionsEvents = |
| 7 require('extensionOptionsEvents').ExtensionOptionsEvents; | 7 require('extensionOptionsEvents').ExtensionOptionsEvents; |
| 8 var GuestViewInternal = | 8 var GuestViewInternal = |
| 9 require('binding').Binding.create('guestViewInternal').generate(); | 9 require('binding').Binding.create('guestViewInternal').generate(); |
| 10 var IdGenerator = requireNative('id_generator'); | 10 var IdGenerator = requireNative('id_generator'); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 this.browserPluginNode = this.createBrowserPluginNode(); | 46 this.browserPluginNode = this.createBrowserPluginNode(); |
| 47 var shadowRoot = this.extensionoptionsNode.createShadowRoot(); | 47 var shadowRoot = this.extensionoptionsNode.createShadowRoot(); |
| 48 shadowRoot.appendChild(this.browserPluginNode); | 48 shadowRoot.appendChild(this.browserPluginNode); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 ExtensionOptionsInternal.prototype.attachWindow = function() { | 51 ExtensionOptionsInternal.prototype.attachWindow = function() { |
| 52 return guestViewInternalNatives.AttachGuest( | 52 return guestViewInternalNatives.AttachGuest( |
| 53 this.internalInstanceId, | 53 this.internalInstanceId, |
| 54 this.guestInstanceId, | 54 this.guestInstanceId, |
| 55 { | 55 { |
| 56 'autosize': this.autosize, | 56 'autosize': this.extensionoptionsNode.hasAttribute('autosize'), |
| 57 'instanceId': this.viewInstanceId, | 57 'instanceId': this.viewInstanceId, |
| 58 'maxheight': parseInt(this.maxheight || 0), | 58 'maxheight': parseInt(this.maxheight || 0), |
| 59 'maxwidth': parseInt(this.maxwidth || 0), | 59 'maxwidth': parseInt(this.maxwidth || 0), |
| 60 'minheight': parseInt(this.minheight || 0), | 60 'minheight': parseInt(this.minheight || 0), |
| 61 'minwidth': parseInt(this.minwidth || 0) | 61 'minwidth': parseInt(this.minwidth || 0) |
| 62 }); | 62 }); |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 ExtensionOptionsInternal.prototype.createBrowserPluginNode = function() { | 65 ExtensionOptionsInternal.prototype.createBrowserPluginNode = function() { |
| 66 var browserPluginNode = new ExtensionOptionsInternal.BrowserPlugin(); | 66 var browserPluginNode = new ExtensionOptionsInternal.BrowserPlugin(); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 367 |
| 368 var useCapture = true; | 368 var useCapture = true; |
| 369 window.addEventListener('readystatechange', function listener(event) { | 369 window.addEventListener('readystatechange', function listener(event) { |
| 370 if (document.readyState == 'loading') | 370 if (document.readyState == 'loading') |
| 371 return; | 371 return; |
| 372 | 372 |
| 373 registerBrowserPluginElement(); | 373 registerBrowserPluginElement(); |
| 374 registerExtensionOptionsElement(); | 374 registerExtensionOptionsElement(); |
| 375 window.removeEventListener(event.type, listener, useCapture); | 375 window.removeEventListener(event.type, listener, useCapture); |
| 376 }, useCapture); | 376 }, useCapture); |
| OLD | NEW |