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 attributes of the <extensionview> tag. | 5 // This module implements the attributes of the <extensionview> tag. |
6 | 6 |
7 var GuestViewAttributes = require('guestViewAttributes').GuestViewAttributes; | 7 var GuestViewAttributes = require('guestViewAttributes').GuestViewAttributes; |
8 var ExtensionViewImpl = require('extensionView').ExtensionViewImpl; | |
9 var ExtensionViewConstants = | 8 var ExtensionViewConstants = |
10 require('extensionViewConstants').ExtensionViewConstants; | 9 require('extensionViewConstants').ExtensionViewConstants; |
| 10 var ExtensionViewImpl = require('extensionView').ExtensionViewImpl; |
11 var ExtensionViewInternal = | 11 var ExtensionViewInternal = |
12 require('extensionViewInternal').ExtensionViewInternal; | 12 require('extensionViewInternal').ExtensionViewInternal; |
13 | 13 |
14 // ----------------------------------------------------------------------------- | 14 // ----------------------------------------------------------------------------- |
15 // ExtensionAttribute object. | 15 // ExtensionAttribute object. |
16 | 16 |
17 // Attribute that handles extension binded to the extensionview. | 17 // Attribute that handles extension binded to the extensionview. |
18 function ExtensionAttribute(view) { | 18 function ExtensionAttribute(view) { |
19 GuestViewAttributes.ReadOnlyAttribute.call( | 19 GuestViewAttributes.ReadOnlyAttribute.call( |
20 this, ExtensionViewConstants.ATTRIBUTE_EXTENSION, view); | 20 this, ExtensionViewConstants.ATTRIBUTE_EXTENSION, view); |
(...skipping 26 matching lines...) Expand all Loading... |
47 !this.view.guest.getId()) { | 47 !this.view.guest.getId()) { |
48 return; | 48 return; |
49 } | 49 } |
50 | 50 |
51 ExtensionViewInternal.navigate(this.view.guest.getId(), this.getValue()); | 51 ExtensionViewInternal.navigate(this.view.guest.getId(), this.getValue()); |
52 }; | 52 }; |
53 | 53 |
54 // ----------------------------------------------------------------------------- | 54 // ----------------------------------------------------------------------------- |
55 | 55 |
56 // Sets up all of the extensionview attributes. | 56 // Sets up all of the extensionview attributes. |
57 ExtensionViewImpl.prototype.setupExtensionViewAttributes = function() { | 57 ExtensionViewImpl.prototype.setupAttributes = function() { |
58 this.attributes = {}; | |
59 this.attributes[ExtensionViewConstants.ATTRIBUTE_EXTENSION] = | 58 this.attributes[ExtensionViewConstants.ATTRIBUTE_EXTENSION] = |
60 new ExtensionAttribute(this); | 59 new ExtensionAttribute(this); |
61 this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC] = | 60 this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC] = |
62 new SrcAttribute(this); | 61 new SrcAttribute(this); |
63 }; | 62 }; |
OLD | NEW |