Index: chrome/renderer/resources/renderer_extension_bindings.js |
diff --git a/chrome/renderer/resources/renderer_extension_bindings.js b/chrome/renderer/resources/renderer_extension_bindings.js |
index b9811c1cb70be74a663a3f5c4993974006550786..2550b2462557e568350d1d6418ab81c3566779a9 100644 |
--- a/chrome/renderer/resources/renderer_extension_bindings.js |
+++ b/chrome/renderer/resources/renderer_extension_bindings.js |
@@ -173,9 +173,8 @@ var chrome = chrome || {}; |
// This function is called on context initialization for both content scripts |
// and extension contexts. |
- chrome.initExtension = function(extensionId, warnOnPrivilegedApiAccess, |
- inIncognitoContext) { |
- delete chrome.initExtension; |
+ chromeHidden.onLoad.addListener(function(extensionId, isExtensionProcess, |
+ inIncognitoContext) { |
chromeHidden.extensionId = extensionId; |
chrome.extension = chrome.extension || {}; |
@@ -259,10 +258,9 @@ var chrome = chrome || {}; |
return GetL10nMessage(message_name, placeholders, extensionId); |
}; |
- if (warnOnPrivilegedApiAccess) { |
+ if (!isExtensionProcess) |
setupApiStubs(); |
- } |
- }; |
+ }); |
var notSupportedSuffix = " is not supported in content scripts. " + |
"See the content scripts documentation for more details."; |