| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 Webview (<webview>) as a custom element that wraps a | 5 // This module implements Webview (<webview>) as a custom element that wraps a |
| 6 // BrowserPlugin object element. The object element is hidden within | 6 // BrowserPlugin object element. The object element is hidden within |
| 7 // the shadow DOM of the Webview element. | 7 // the shadow DOM of the Webview element. |
| 8 | 8 |
| 9 var DocumentNatives = requireNative('document_natives'); | 9 var DocumentNatives = requireNative('document_natives'); |
| 10 var GuestViewInternal = | 10 var GuestViewInternal = |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 } | 759 } |
| 760 internal.handleBrowserPluginAttributeMutation(name, newValue); | 760 internal.handleBrowserPluginAttributeMutation(name, newValue); |
| 761 }; | 761 }; |
| 762 | 762 |
| 763 proto.attachedCallback = function() { | 763 proto.attachedCallback = function() { |
| 764 // Load the plugin immediately. | 764 // Load the plugin immediately. |
| 765 var unused = this.nonExistentAttribute; | 765 var unused = this.nonExistentAttribute; |
| 766 }; | 766 }; |
| 767 | 767 |
| 768 WebViewInternal.BrowserPlugin = | 768 WebViewInternal.BrowserPlugin = |
| 769 DocumentNatives.RegisterElement('browser-plugin', {extends: 'object', | 769 DocumentNatives.RegisterElement('browserplugin', {extends: 'object', |
| 770 prototype: proto}); | 770 prototype: proto}); |
| 771 | 771 |
| 772 delete proto.createdCallback; | 772 delete proto.createdCallback; |
| 773 delete proto.attachedCallback; | 773 delete proto.attachedCallback; |
| 774 delete proto.detachedCallback; | 774 delete proto.detachedCallback; |
| 775 delete proto.attributeChangedCallback; | 775 delete proto.attributeChangedCallback; |
| 776 } | 776 } |
| 777 | 777 |
| 778 // Registers <webview> custom element. | 778 // Registers <webview> custom element. |
| 779 function registerWebViewElement() { | 779 function registerWebViewElement() { |
| 780 var proto = Object.create(HTMLElement.prototype); | 780 var proto = Object.create(HTMLElement.prototype); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 }; | 888 }; |
| 889 | 889 |
| 890 /** | 890 /** |
| 891 * Implemented when the experimental API is available. | 891 * Implemented when the experimental API is available. |
| 892 * @private | 892 * @private |
| 893 */ | 893 */ |
| 894 WebViewInternal.prototype.setupExperimentalContextMenus = function() {}; | 894 WebViewInternal.prototype.setupExperimentalContextMenus = function() {}; |
| 895 | 895 |
| 896 exports.WebView = WebView; | 896 exports.WebView = WebView; |
| 897 exports.WebViewInternal = WebViewInternal; | 897 exports.WebViewInternal = WebViewInternal; |
| OLD | NEW |