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

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

Issue 23591016: BrowserPlugin/WebView - Move plugin lifetime to DOM (Chromium-side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase CL. Created 7 years, 1 month 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
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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 writable: false 901 writable: false
902 } 902 }
903 ); 903 );
904 }; 904 };
905 905
906 // Registers browser plugin <object> custom element. 906 // Registers browser plugin <object> custom element.
907 function registerBrowserPluginElement() { 907 function registerBrowserPluginElement() {
908 var proto = Object.create(HTMLObjectElement.prototype); 908 var proto = Object.create(HTMLObjectElement.prototype);
909 909
910 proto.createdCallback = function() { 910 proto.createdCallback = function() {
911 // The <object> node fills in the <webview> container.
911 this.setAttribute('type', 'application/browser-plugin'); 912 this.setAttribute('type', 'application/browser-plugin');
912 // The <object> node fills in the <webview> container.
913 this.style.width = '100%'; 913 this.style.width = '100%';
914 this.style.height = '100%'; 914 this.style.height = '100%';
915 }; 915 };
916 916
917 proto.attributeChangedCallback = function(name, oldValue, newValue) { 917 proto.attributeChangedCallback = function(name, oldValue, newValue) {
918 if (!this.internal_) { 918 if (!this.internal_) {
919 return; 919 return;
920 } 920 }
921 var internal = this.internal_(secret); 921 var internal = this.internal_(secret);
922 internal.handleBrowserPluginAttributeMutation_(name, newValue); 922 internal.handleBrowserPluginAttributeMutation_(name, newValue);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 * Implemented when the experimental API is available. 1029 * Implemented when the experimental API is available.
1030 * @private 1030 * @private
1031 */ 1031 */
1032 WebViewInternal.prototype.maybeGetExperimentalPermissions_ = function() { 1032 WebViewInternal.prototype.maybeGetExperimentalPermissions_ = function() {
1033 return []; 1033 return [];
1034 }; 1034 };
1035 1035
1036 exports.WebView = WebView; 1036 exports.WebView = WebView;
1037 exports.WebViewInternal = WebViewInternal; 1037 exports.WebViewInternal = WebViewInternal;
1038 exports.CreateEvent = CreateEvent; 1038 exports.CreateEvent = CreateEvent;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698