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

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

Issue 24576003: <webview>: Change how plugin load works inside guests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 extension to provide permission request API (and possibly other future 5 // Shim extension to provide permission request API (and possibly other future
6 // experimental APIs) for <webview> tag. 6 // experimental APIs) for <webview> tag.
7 // See web_view.js for details. 7 // See web_view.js for details.
8 // 8 //
9 // We want to control the permission API feature in <webview> separately from 9 // We want to control the permission API feature in <webview> separately from
10 // the <webview> feature itself. <webview> is available in stable channel, but 10 // the <webview> feature itself. <webview> is available in stable channel, but
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 WebView.setPermission(self.instanceId_, requestId, false, ''); 111 WebView.setPermission(self.instanceId_, requestId, false, '');
112 showWarningMessage(event.messageType); 112 showWarningMessage(event.messageType);
113 } 113 }
114 }; 114 };
115 115
116 /** @private */ 116 /** @private */
117 WebViewInternal.prototype.maybeGetExperimentalEvents_ = function() { 117 WebViewInternal.prototype.maybeGetExperimentalEvents_ = function() {
118 return WEB_VIEW_EXPERIMENTAL_EVENTS; 118 return WEB_VIEW_EXPERIMENTAL_EVENTS;
119 }; 119 };
120 120
121 WebViewInternal.prototype.maybeGetExperimentalPermissions_ = function() {
122 return ['loadplugin'];
123 };
124
121 /** @private */ 125 /** @private */
122 WebViewInternal.prototype.clearData_ = function(var_args) { 126 WebViewInternal.prototype.clearData_ = function(var_args) {
123 if (!this.instanceId_) { 127 if (!this.instanceId_) {
124 return; 128 return;
125 } 129 }
126 var args = $Array.concat([this.instanceId_], $Array.slice(arguments)); 130 var args = $Array.concat([this.instanceId_], $Array.slice(arguments));
127 $Function.apply(WebView.clearData, null, args); 131 $Function.apply(WebView.clearData, null, args);
128 }; 132 };
129 133
130 /** @private */ 134 /** @private */
(...skipping 29 matching lines...) Expand all
160 }; 164 };
161 165
162 proto.isUserAgentOverridden = function() { 166 proto.isUserAgentOverridden = function() {
163 return this.internal_(secret).isUserAgentOverridden_(); 167 return this.internal_(secret).isUserAgentOverridden_();
164 }; 168 };
165 169
166 proto.setUserAgentOverride = function(userAgentOverride) { 170 proto.setUserAgentOverride = function(userAgentOverride) {
167 this.internal_(secret).setUserAgentOverride_(userAgentOverride); 171 this.internal_(secret).setUserAgentOverride_(userAgentOverride);
168 }; 172 };
169 }; 173 };
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/web_view.js ('k') | chrome/test/data/extensions/platform_apps/web_view/shim/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698