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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/renderer/resources/renderer_extension_bindings.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This script contains privileged chrome extension related javascript APIs. 5 // This script contains privileged chrome extension related javascript APIs.
6 // It is loaded by pages whose URL has the chrome-extension protocol. 6 // It is loaded by pages whose URL has the chrome-extension protocol.
7 7
8 var chrome = chrome || {}; 8 var chrome = chrome || {};
9 (function() { 9 (function() {
10 native function GetExtensionAPIDefinition(); 10 native function GetExtensionAPIDefinition();
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 try { 755 try {
756 if (responseCallback) 756 if (responseCallback)
757 responseCallback(response); 757 responseCallback(response);
758 } finally { 758 } finally {
759 port.disconnect(); 759 port.disconnect();
760 port = null; 760 port = null;
761 } 761 }
762 }); 762 });
763 }; 763 };
764 764
765 apiFunctions["experimental.downloads.download"].customCallback =
766 function(name, request, response) {
767 if (response) {
768 response = chromeHidden.JSON.parse(response);
769 } else {
770 response = {};
771 }
772 if (request.callback) {
773 request.callback(response["id"], response["error"]);
774 }
775 request.callback = null;
776 };
777
765 apiFunctions["fileBrowserPrivate.requestLocalFileSystem"].customCallback = 778 apiFunctions["fileBrowserPrivate.requestLocalFileSystem"].customCallback =
766 function(name, request, response) { 779 function(name, request, response) {
767 var resp = response ? [chromeHidden.JSON.parse(response)] : []; 780 var resp = response ? [chromeHidden.JSON.parse(response)] : [];
768 var fs = null; 781 var fs = null;
769 if (!resp[0].error) 782 if (!resp[0].error)
770 fs = GetLocalFileSystem(resp[0].name, resp[0].path); 783 fs = GetLocalFileSystem(resp[0].name, resp[0].path);
771 if (request.callback) 784 if (request.callback)
772 request.callback(fs); 785 request.callback(fs);
773 request.callback = null; 786 request.callback = null;
774 }; 787 };
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
1034 chrome.experimental = {}; 1047 chrome.experimental = {};
1035 1048
1036 if (!chrome.experimental.accessibility) 1049 if (!chrome.experimental.accessibility)
1037 chrome.experimental.accessibility = {}; 1050 chrome.experimental.accessibility = {};
1038 1051
1039 if (!chrome.experimental.tts) 1052 if (!chrome.experimental.tts)
1040 chrome.experimental.tts = {}; 1053 chrome.experimental.tts = {};
1041 1054
1042 if (!chrome.experimental.ttsEngine) 1055 if (!chrome.experimental.ttsEngine)
1043 chrome.experimental.ttsEngine = {}; 1056 chrome.experimental.ttsEngine = {};
1057
1058 if (!chrome.experimental.downloads)
1059 chrome.experimental.downloads = {};
1044 })(); 1060 })();
OLDNEW
« 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