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

Side by Side Diff: chrome/browser/extensions/extension_file_browser_private_api.h

Issue 7826037: Adding support to retrieve remaining and total space on disk/file shelf. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 virtual bool RunImpl() OVERRIDE; 289 virtual bool RunImpl() OVERRIDE;
290 290
291 // FileBrowserFunction overrides. 291 // FileBrowserFunction overrides.
292 virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files, 292 virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files,
293 void* context) OVERRIDE; 293 void* context) OVERRIDE;
294 294
295 private: 295 private:
296 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.formatDevice"); 296 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.formatDevice");
297 }; 297 };
298 298
299 class GetSizeStatsFunction
300 :
301 #ifdef OS_CHROMEOS
302 public chromeos::MountLibrary::CallbackDelegate,
303 #endif
304 public FileBrowserFunction {
305 public:
306 GetSizeStatsFunction();
307
308 #ifdef OS_CHROMEOS
309 // chromeos::MountLibrary::CallbackDelegate implementation.
310 void GetSizeStatsCallback(const char* mount_path,
311 bool success,
312 size_t total_size_kb,
313 size_t remaining_size_kb) OVERRIDE;
314 #endif
315
316 protected:
317 virtual ~GetSizeStatsFunction();
318
319 // FileBrowserFunction overrides.
320 virtual bool RunImpl() OVERRIDE;
321 virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files,
322 void* context) OVERRIDE;
323
324 private:
325 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getSizeStats");
326 };
327
299 // Retrieves devices meta-data. Expects volume's device path as an argument. 328 // Retrieves devices meta-data. Expects volume's device path as an argument.
300 class GetVolumeMetadataFunction 329 class GetVolumeMetadataFunction
301 : public SyncExtensionFunction { 330 : public SyncExtensionFunction {
302 public: 331 public:
303 GetVolumeMetadataFunction(); 332 GetVolumeMetadataFunction();
304 333
305 protected: 334 protected:
306 virtual ~GetVolumeMetadataFunction(); 335 virtual ~GetVolumeMetadataFunction();
307 336
308 virtual bool RunImpl() OVERRIDE; 337 virtual bool RunImpl() OVERRIDE;
(...skipping 15 matching lines...) Expand all
324 virtual ~FileDialogStringsFunction() {} 353 virtual ~FileDialogStringsFunction() {}
325 354
326 // SyncExtensionFunction overrides. 355 // SyncExtensionFunction overrides.
327 virtual bool RunImpl() OVERRIDE; 356 virtual bool RunImpl() OVERRIDE;
328 357
329 private: 358 private:
330 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); 359 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings");
331 }; 360 };
332 361
333 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ 362 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698