summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/resources/extensions/chrome_private_custom_bindings.js
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/resources/extensions/chrome_private_custom_bindings.js')
-rw-r--r--chrome/renderer/resources/extensions/chrome_private_custom_bindings.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/renderer/resources/extensions/chrome_private_custom_bindings.js b/chrome/renderer/resources/extensions/chrome_private_custom_bindings.js
index b50bbee..c3f712b 100644
--- a/chrome/renderer/resources/extensions/chrome_private_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/chrome_private_custom_bindings.js
@@ -4,15 +4,17 @@
// Custom bindings for the chromePrivate API.
-var chromePrivate = requireNative('chrome_private');
-var DecodeJPEG = chromePrivate.DecodeJPEG;
+(function() {
-var chromeHidden = requireNative('chrome_hidden').GetChromeHidden();
+native function GetChromeHidden();
+native function DecodeJPEG(jpegImage);
-chromeHidden.registerCustomHook('chromePrivate', function(bindingsAPI) {
+GetChromeHidden().registerCustomHook('chromePrivate', function(bindingsAPI) {
var apiFunctions = bindingsAPI.apiFunctions;
apiFunctions.setHandleRequest('decodeJPEG', function(jpeg_image) {
return DecodeJPEG(jpeg_image);
});
});
+
+})();