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 64814c9a0e8fb700d4711d80e3dd16341d0c8d17..e162c4d4932d887b9a1b233fb2a540dfc93deadd 100644 |
--- a/chrome/renderer/resources/extension_process_bindings.js |
+++ b/chrome/renderer/resources/extension_process_bindings.js |
@@ -762,6 +762,19 @@ var chrome = chrome || {}; |
}); |
}; |
+ apiFunctions["experimental.downloads.download"].customCallback = |
+ function(name, request, response) { |
+ if (response) { |
+ response = chromeHidden.JSON.parse(response); |
+ } else { |
+ response = {}; |
+ } |
+ if (request.callback) { |
+ request.callback(response["id"], response["error"]); |
+ } |
+ request.callback = null; |
+ }; |
+ |
apiFunctions["fileBrowserPrivate.requestLocalFileSystem"].customCallback = |
function(name, request, response) { |
var resp = response ? [chromeHidden.JSON.parse(response)] : []; |
@@ -1041,4 +1054,7 @@ var chrome = chrome || {}; |
if (!chrome.experimental.ttsEngine) |
chrome.experimental.ttsEngine = {}; |
+ |
+ if (!chrome.experimental.downloads) |
+ chrome.experimental.downloads = {}; |
})(); |