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

Side by Side Diff: chrome/renderer/resources/extensions/file_system_custom_bindings.js

Issue 1029803004: Add chrome.fileSystem.GetVolumeList(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed chrome_extensions.js. Created 5 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Custom binding for the fileSystem API. 5 // Custom binding for the fileSystem API.
6 6
7 var binding = require('binding').Binding.create('fileSystem'); 7 var binding = require('binding').Binding.create('fileSystem');
8 var sendRequest = require('sendRequest'); 8 var sendRequest = require('sendRequest');
9 9
10 var getFileBindingsForApi = 10 var getFileBindingsForApi =
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 fileSystem = fileSystemNatives.GetIsolatedFileSystem( 87 fileSystem = fileSystemNatives.GetIsolatedFileSystem(
88 response.file_system_id, response.file_system_path); 88 response.file_system_id, response.file_system_path);
89 } 89 }
90 sendRequest.safeCallbackApply( 90 sendRequest.safeCallbackApply(
91 'fileSystem.requestFileSystem', 91 'fileSystem.requestFileSystem',
92 request, 92 request,
93 callback, 93 callback,
94 [fileSystem]); 94 [fileSystem]);
95 }); 95 });
96 96
97 apiFunctions.setCustomCallback('getVolumeList',
98 function(name, request, callback, response) {
99 var volumeList = response || null;
100 sendRequest.safeCallbackApply(
101 'fileSystem.getVolumeList',
102 request,
103 callback,
104 [volumeList]);
105 });
106
97 // TODO(benwells): Remove these deprecated versions of the functions. 107 // TODO(benwells): Remove these deprecated versions of the functions.
98 fileSystem.getWritableFileEntry = function() { 108 fileSystem.getWritableFileEntry = function() {
99 console.log("chrome.fileSystem.getWritableFileEntry is deprecated"); 109 console.log("chrome.fileSystem.getWritableFileEntry is deprecated");
100 console.log("Please use chrome.fileSystem.getWritableEntry instead"); 110 console.log("Please use chrome.fileSystem.getWritableEntry instead");
101 $Function.apply(fileSystem.getWritableEntry, this, arguments); 111 $Function.apply(fileSystem.getWritableEntry, this, arguments);
102 }; 112 };
103 113
104 fileSystem.isWritableFileEntry = function() { 114 fileSystem.isWritableFileEntry = function() {
105 console.log("chrome.fileSystem.isWritableFileEntry is deprecated"); 115 console.log("chrome.fileSystem.isWritableFileEntry is deprecated");
106 console.log("Please use chrome.fileSystem.isWritableEntry instead"); 116 console.log("Please use chrome.fileSystem.isWritableEntry instead");
107 $Function.apply(fileSystem.isWritableEntry, this, arguments); 117 $Function.apply(fileSystem.isWritableEntry, this, arguments);
108 }; 118 };
109 119
110 fileSystem.chooseFile = function() { 120 fileSystem.chooseFile = function() {
111 console.log("chrome.fileSystem.chooseFile is deprecated"); 121 console.log("chrome.fileSystem.chooseFile is deprecated");
112 console.log("Please use chrome.fileSystem.chooseEntry instead"); 122 console.log("Please use chrome.fileSystem.chooseEntry instead");
113 $Function.apply(fileSystem.chooseEntry, this, arguments); 123 $Function.apply(fileSystem.chooseEntry, this, arguments);
114 }; 124 };
115 }); 125 });
116 126
117 exports.bindFileEntryCallback = bindFileEntryCallback; 127 exports.bindFileEntryCallback = bindFileEntryCallback;
118 exports.binding = binding.generate(); 128 exports.binding = binding.generate();
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/file_system.idl ('k') | chrome/test/data/chromeos/app_mode/get_volume_list/key.pem » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698