| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // This module implements the ExtensionView <extensionview>. | 5 // This module implements the ExtensionView <extensionview>. |
| 6 | 6 |
| 7 var GuestViewContainer = require('guestViewContainer').GuestViewContainer; | 7 var GuestViewContainer = require('guestViewContainer').GuestViewContainer; |
| 8 var ExtensionViewConstants = | 8 var ExtensionViewConstants = |
| 9 require('extensionViewConstants').ExtensionViewConstants; | 9 require('extensionViewConstants').ExtensionViewConstants; |
| 10 var ExtensionViewEvents = require('extensionViewEvents').ExtensionViewEvents; | 10 var ExtensionViewEvents = require('extensionViewEvents').ExtensionViewEvents; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 ExtensionViewImpl.VIEW_TYPE = 'ExtensionView'; | 22 ExtensionViewImpl.VIEW_TYPE = 'ExtensionView'; |
| 23 | 23 |
| 24 ExtensionViewImpl.setupElement = function(proto) { | 24 ExtensionViewImpl.setupElement = function(proto) { |
| 25 var apiMethods = ExtensionViewImpl.getApiMethods(); | 25 var apiMethods = ExtensionViewImpl.getApiMethods(); |
| 26 | 26 |
| 27 GuestViewContainer.forwardApiMethods(proto, apiMethods); | 27 GuestViewContainer.forwardApiMethods(proto, apiMethods); |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 ExtensionViewImpl.prototype.createGuest = function() { | 30 ExtensionViewImpl.prototype.createGuest = function() { |
| 31 this.guest.create(this.buildParams(), function() { | 31 this.guest.create(this.buildParams(), function() { |
| 32 this.attachWindow(); | 32 this.attachWindow$(); |
| 33 }.bind(this)); | 33 }.bind(this)); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 ExtensionViewImpl.prototype.buildContainerParams = function() { | 36 ExtensionViewImpl.prototype.buildContainerParams = function() { |
| 37 var params = {}; | 37 var params = {}; |
| 38 for (var i in this.attributes) { | 38 for (var i in this.attributes) { |
| 39 params[i] = this.attributes[i].getValue(); | 39 params[i] = this.attributes[i].getValue(); |
| 40 } | 40 } |
| 41 return params; | 41 return params; |
| 42 }; | 42 }; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 53 // Updates src upon loadcommit. | 53 // Updates src upon loadcommit. |
| 54 ExtensionViewImpl.prototype.onLoadCommit = function(url) { | 54 ExtensionViewImpl.prototype.onLoadCommit = function(url) { |
| 55 this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC]. | 55 this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC]. |
| 56 setValueIgnoreMutation(url); | 56 setValueIgnoreMutation(url); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 GuestViewContainer.registerElement(ExtensionViewImpl); | 59 GuestViewContainer.registerElement(ExtensionViewImpl); |
| 60 | 60 |
| 61 // Exports. | 61 // Exports. |
| 62 exports.ExtensionViewImpl = ExtensionViewImpl; | 62 exports.ExtensionViewImpl = ExtensionViewImpl; |
| OLD | NEW |