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

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: removed AddRef/Release from file_browser_private_api.cc 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 : public FileBrowserFunction {
301 public:
302 GetSizeStatsFunction();
303
304 void GetSizeStatsCallbackOnUIThread(const char* mount_path,
305 size_t total_size_kb,
306 size_t remaining_size_kb) OVERRIDE;
307 void CallGetSizeStatsOnFileThread(const char* mount_path);
308
309 protected:
310 virtual ~GetSizeStatsFunction();
311
312 // FileBrowserFunction overrides.
313 virtual bool RunImpl() OVERRIDE;
314 virtual void GetLocalPathsResponseOnUIThread(const FilePathList& files,
315 void* context) OVERRIDE;
316
317 private:
318 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getSizeStats");
319 };
320
299 // Retrieves devices meta-data. Expects volume's device path as an argument. 321 // Retrieves devices meta-data. Expects volume's device path as an argument.
300 class GetVolumeMetadataFunction 322 class GetVolumeMetadataFunction
301 : public SyncExtensionFunction { 323 : public SyncExtensionFunction {
302 public: 324 public:
303 GetVolumeMetadataFunction(); 325 GetVolumeMetadataFunction();
304 326
305 protected: 327 protected:
306 virtual ~GetVolumeMetadataFunction(); 328 virtual ~GetVolumeMetadataFunction();
307 329
308 virtual bool RunImpl() OVERRIDE; 330 virtual bool RunImpl() OVERRIDE;
(...skipping 15 matching lines...) Expand all
324 virtual ~FileDialogStringsFunction() {} 346 virtual ~FileDialogStringsFunction() {}
325 347
326 // SyncExtensionFunction overrides. 348 // SyncExtensionFunction overrides.
327 virtual bool RunImpl() OVERRIDE; 349 virtual bool RunImpl() OVERRIDE;
328 350
329 private: 351 private:
330 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); 352 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings");
331 }; 353 };
332 354
333 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_ 355 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FILE_BROWSER_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698