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

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

Issue 7192016: chrome.experimental.downloads (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged db_handle, id; onCreated, onErased Created 9 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/common/pref_names.cc ('k') | chrome/renderer/resources/renderer_extension_bindings.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 = {};
})();
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/renderer/resources/renderer_extension_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698