Index: chrome/renderer/resources/extensions/utils.js |
diff --git a/chrome/renderer/resources/extensions/utils.js b/chrome/renderer/resources/extensions/utils.js |
index 47d827745128bb7e40b2af5baa633957ee25dc21..c9fbb7834819f21a976a2ece1406e725762677f8 100644 |
--- a/chrome/renderer/resources/extensions/utils.js |
+++ b/chrome/renderer/resources/extensions/utils.js |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+var chrome = requireNative('chrome').GetChrome(); |
not at google - send to devlin
2013/01/24 21:10:12
Just curious: is there a particular reason why you
cduvall
2013/01/24 22:15:15
I think since they are being loaded differently th
|
+ |
function forEach(dict, f) { |
for (key in dict) { |
if (dict.hasOwnProperty(key)) |
@@ -25,5 +27,11 @@ function lookup(array_of_dictionaries, field, value) { |
} |
} |
+function loadRefDependency(ref) { |
+ var parts = ref.split("."); |
+ return chrome[parts.slice(0, parts.length - 1).join(".")]; |
not at google - send to devlin
2013/01/24 21:10:12
So this forces the object to be loaded? What if |r
cduvall
2013/01/24 22:15:15
This will just do nothing if its called for a ref
|
+} |
+ |
exports.forEach = forEach; |
+exports.loadRefDependency = loadRefDependency; |
exports.lookup = lookup; |