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

Unified Diff: chrome/renderer/resources/extension_process_bindings.js

Issue 7727004: Initialize content scripts the same way extension scripts are. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/extension_process_bindings.js
diff --git a/chrome/renderer/resources/extension_process_bindings.js b/chrome/renderer/resources/extension_process_bindings.js
index 9c95f434cde1f375d5cebcd9464831482d651534..c0c93eeecaf3bf342a43054db64cfe6c80349186 100644
--- a/chrome/renderer/resources/extension_process_bindings.js
+++ b/chrome/renderer/resources/extension_process_bindings.js
@@ -18,8 +18,6 @@ var chrome = chrome || {};
native function OpenChannelToTab();
native function GetRenderViewId();
native function SetIconCommon();
- native function IsExtensionProcess();
- native function IsIncognitoProcess();
native function GetUniqueSubEventName(eventName);
native function GetLocalFileSystem(name, path);
native function DecodeJPEG(jpeg_image);
@@ -27,19 +25,6 @@ var chrome = chrome || {};
var chromeHidden = GetChromeHidden();
- // These bindings are for the extension process only. Since a chrome-extension
- // URL can be loaded in an iframe of a regular renderer, we check here to
- // ensure we don't expose the APIs in that case.
- if (!IsExtensionProcess()) {
- chromeHidden.onLoad.addListener(function (extensionId) {
- if (!extensionId) {
- return;
- }
- chrome.initExtension(extensionId, false);
- });
- return;
- }
-
if (!chrome)
chrome = {};
@@ -590,11 +575,10 @@ var chrome = chrome || {};
return "unknown";
}
- chromeHidden.onLoad.addListener(function (extensionId) {
- if (!extensionId) {
+ chromeHidden.onLoad.addListener(function(extensionId, isExtensionProcess,
+ isIncognitoProcess) {
+ if (!isExtensionProcess)
Matt Perry 2011/08/24 22:11:34 not all the extension-specific code is in this lis
return;
- }
- chrome.initExtension(extensionId, false, IsIncognitoProcess());
// Setup the ChromeSetting class so we can use it to construct
// ChromeSetting objects from the API definition.
« no previous file with comments | « chrome/renderer/resources/event_bindings.js ('k') | chrome/renderer/resources/renderer_extension_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698