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/chromeos/extensions/file_browser_private_api.h

Issue 9545006: This adds some GData private API to the file manager (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: One last SetBoolean Created 8 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_private_api.cc » ('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) 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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 protected: 376 protected:
377 virtual ~FileDialogStringsFunction() {} 377 virtual ~FileDialogStringsFunction() {}
378 378
379 // SyncExtensionFunction overrides. 379 // SyncExtensionFunction overrides.
380 virtual bool RunImpl() OVERRIDE; 380 virtual bool RunImpl() OVERRIDE;
381 381
382 private: 382 private:
383 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings"); 383 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getStrings");
384 }; 384 };
385 385
386 // Retrieve property information for multiple files, returning a list of the
387 // same length as the input list of file URLs. If a particular file has an
388 // error, then return a dictionary with the key "error" set to the error number
389 // (base::PlatformFileError) for that entry in the returned list.
390 class GetGDataFilePropertiesFunction : public FileBrowserFunction {
391 public:
392 GetGDataFilePropertiesFunction();
393
394 protected:
395 virtual ~GetGDataFilePropertiesFunction();
396
397 // Virtual function that can be overridden to do operations on each virtual
398 // file path before fetching the properties. Return false to stop iterating
399 // over the files.
400 virtual bool DoOperation(const FilePath& file);
401
402 // AsyncExtensionFunction overrides.
403 virtual bool RunImpl() OVERRIDE;
404
405 private:
406 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFileProperties");
407 };
408
409 // Pin multiple files in the cache, returning a list of file properties with the
410 // updated cache state. The returned array is the same length as the input list
411 // of file URLs. If a particular file has an error, then return a dictionary
412 // with the key "error" set to the error number (base::PlatformFileError) for
413 // that entry in the returned list.
414 class PinGDataFileFunction : public GetGDataFilePropertiesFunction {
415 public:
416 PinGDataFileFunction();
417
418 protected:
419 virtual ~PinGDataFileFunction();
420
421 private:
422 // Actually do the pinning of each file.
423 virtual bool DoOperation(const FilePath& path) OVERRIDE;
424
425 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinGDataFile");
426 };
427
386 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ 428 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698