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

Unified Diff: chrome/renderer/resources/extensions/web_view.js

Issue 17451011: Make the externally connectable browser test clobber all of the builtins, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/web_view.js
diff --git a/chrome/renderer/resources/extensions/web_view.js b/chrome/renderer/resources/extensions/web_view.js
index 1e19344d48253593f2c9ffe0414e7695b929b6f1..75b05fb05bd1b152c2b36ea4b8a59afaf7a35a0e 100644
--- a/chrome/renderer/resources/extensions/web_view.js
+++ b/chrome/renderer/resources/extensions/web_view.js
@@ -138,7 +138,7 @@ WebView.prototype.setupWebviewNodeMethods_ = function() {
var self = this;
$Array.forEach(WEB_VIEW_API_METHODS, function(apiMethod) {
self.webviewNode_[apiMethod] = function(var_args) {
- return self.browserPluginNode_[apiMethod].apply(
+ return $Function.apply(self.browserPluginNode_[apiMethod],
self.browserPluginNode_, arguments);
};
}, this);
@@ -388,15 +388,15 @@ WebView.prototype.setupExecuteCodeAPI_ = function() {
this.webviewNode_['executeScript'] = function(var_args) {
validateCall();
- var args = [self.browserPluginNode_.getGuestInstanceId()].concat(
- Array.prototype.slice.call(arguments));
- chrome.webview.executeScript.apply(null, args);
+ var args = $Array.concat([self.browserPluginNode_.getGuestInstanceId()],
+ $Array.slice(arguments));
+ $Function.apply(chrome.webview.executeScript, null, args);
}
this.webviewNode_['insertCSS'] = function(var_args) {
validateCall();
- var args = [self.browserPluginNode_.getGuestInstanceId()].concat(
- Array.prototype.slice.call(arguments));
- chrome.webview.insertCSS.apply(null, args);
+ var args = $Array.concat([self.browserPluginNode_.getGuestInstanceId()],
+ $Array.slice(arguments));
+ $Function.apply(chrome.webview.insertCSS, null, args);
}
};

Powered by Google App Engine
This is Rietveld 408576698