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

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

Issue 10698163: Make miscellaneous_bindings.js not depend on onLoad(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 5 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
« no previous file with comments | « chrome/renderer/resources/extensions/extension_custom_bindings.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/extensions/miscellaneous_bindings.js
diff --git a/chrome/renderer/resources/extensions/miscellaneous_bindings.js b/chrome/renderer/resources/extensions/miscellaneous_bindings.js
index 1124e8b724238adb70eaf322e53e371fc6acf140..d860bab0322f613b8c0455faed2ac4f351367de4 100644
--- a/chrome/renderer/resources/extensions/miscellaneous_bindings.js
+++ b/chrome/renderer/resources/extensions/miscellaneous_bindings.js
@@ -18,8 +18,10 @@
var BindToGC = miscNatives.BindToGC;
var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
- var manifestVersion;
- var extensionId;
+
+ var processNatives = requireNative('process');
+ var manifestVersion = processNatives.GetManifestVersion();
+ var extensionId = processNatives.GetExtensionId();
// The reserved channel name for the sendRequest/sendMessage APIs.
// Note: sendRequest is deprecated.
@@ -288,22 +290,3 @@
}
});
}
-
- // This function is called on context initialization for both content scripts
- // and extension contexts.
- chromeHidden.onLoad.addListener(function(tempExtensionId,
- isExtensionProcess,
- inIncognitoContext,
- tempManifestVersion) {
- extensionId = tempExtensionId;
- manifestVersion = tempManifestVersion;
-
- chrome.extension = chrome.extension || {};
-
- if (manifestVersion < 2) {
- chrome.self = chrome.extension;
- chrome.extension.inIncognitoTab = inIncognitoContext;
- }
-
- chrome.extension.inIncognitoContext = inIncognitoContext;
- });
« no previous file with comments | « chrome/renderer/resources/extensions/extension_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698