Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: chrome/renderer/resources/extensions/web_view.js

Issue 23702032: Prepare Webview's browser plugin for coming Custom Elements API change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Shim that simulates a <webview> tag via Mutation Observers. 5 // Shim that simulates a <webview> tag via Mutation Observers.
6 // 6 //
7 // The actual tag is implemented via the browser plugin. The internals of this 7 // The actual tag is implemented via the browser plugin. The internals of this
8 // are hidden via Shadow DOM. 8 // are hidden via Shadow DOM.
9 9
10 'use strict'; 10 'use strict';
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 828
829 proto.attributeChangedCallback = function(name, oldValue, newValue) { 829 proto.attributeChangedCallback = function(name, oldValue, newValue) {
830 if (!this.internal_) { 830 if (!this.internal_) {
831 return; 831 return;
832 } 832 }
833 var internal = this.internal_(secret); 833 var internal = this.internal_(secret);
834 internal.handleBrowserPluginAttributeMutation_(name, newValue); 834 internal.handleBrowserPluginAttributeMutation_(name, newValue);
835 }; 835 };
836 836
837 WebViewInternal.BrowserPlugin = 837 WebViewInternal.BrowserPlugin =
838 DocumentNatives.RegisterElement('browser-plugin', {prototype: proto}); 838 DocumentNatives.RegisterElement('browser-plugin', {extends: 'object',
839 prototype: proto});
839 840
840 delete proto.createdCallback; 841 delete proto.createdCallback;
841 delete proto.enteredDocumentCallback; 842 delete proto.enteredDocumentCallback;
842 delete proto.leftDocumentCallback; 843 delete proto.leftDocumentCallback;
843 delete proto.attributeChangedCallback; 844 delete proto.attributeChangedCallback;
844 } 845 }
845 846
846 // Registers <webview> custom element. 847 // Registers <webview> custom element.
847 function registerWebViewElement() { 848 function registerWebViewElement() {
848 var proto = Object.create(HTMLElement.prototype); 849 var proto = Object.create(HTMLElement.prototype);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 933
933 /** 934 /**
934 * Implemented when the experimental API is available. 935 * Implemented when the experimental API is available.
935 * @private 936 * @private
936 */ 937 */
937 WebViewInternal.prototype.maybeAttachWebRequestEventToWebview_ = function() {}; 938 WebViewInternal.prototype.maybeAttachWebRequestEventToWebview_ = function() {};
938 939
939 exports.WebView = WebView; 940 exports.WebView = WebView;
940 exports.WebViewInternal = WebViewInternal; 941 exports.WebViewInternal = WebViewInternal;
941 exports.CreateEvent = CreateEvent; 942 exports.CreateEvent = CreateEvent;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698