| 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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 } | 798 } |
| 799 internal.handleBrowserPluginAttributeMutation(name, oldValue, newValue); | 799 internal.handleBrowserPluginAttributeMutation(name, oldValue, newValue); |
| 800 }; | 800 }; |
| 801 | 801 |
| 802 proto.attachedCallback = function() { | 802 proto.attachedCallback = function() { |
| 803 // Load the plugin immediately. | 803 // Load the plugin immediately. |
| 804 var unused = this.nonExistentAttribute; | 804 var unused = this.nonExistentAttribute; |
| 805 }; | 805 }; |
| 806 | 806 |
| 807 WebViewInternal.BrowserPlugin = | 807 WebViewInternal.BrowserPlugin = |
| 808 DocumentNatives.RegisterElement('browser-plugin', {extends: 'object', | 808 DocumentNatives.RegisterElement('browserplugin', {extends: 'object', |
| 809 prototype: proto}); | 809 prototype: proto}); |
| 810 | 810 |
| 811 delete proto.createdCallback; | 811 delete proto.createdCallback; |
| 812 delete proto.attachedCallback; | 812 delete proto.attachedCallback; |
| 813 delete proto.detachedCallback; | 813 delete proto.detachedCallback; |
| 814 delete proto.attributeChangedCallback; | 814 delete proto.attributeChangedCallback; |
| 815 } | 815 } |
| 816 | 816 |
| 817 // Registers <webview> custom element. | 817 // Registers <webview> custom element. |
| 818 function registerWebViewElement() { | 818 function registerWebViewElement() { |
| 819 var proto = Object.create(HTMLElement.prototype); | 819 var proto = Object.create(HTMLElement.prototype); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 }; | 927 }; |
| 928 | 928 |
| 929 /** | 929 /** |
| 930 * Implemented when the experimental API is available. | 930 * Implemented when the experimental API is available. |
| 931 * @private | 931 * @private |
| 932 */ | 932 */ |
| 933 WebViewInternal.prototype.setupExperimentalContextMenus = function() {}; | 933 WebViewInternal.prototype.setupExperimentalContextMenus = function() {}; |
| 934 | 934 |
| 935 exports.WebView = WebView; | 935 exports.WebView = WebView; |
| 936 exports.WebViewInternal = WebViewInternal; | 936 exports.WebViewInternal = WebViewInternal; |
| OLD | NEW |