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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_api.h

Issue 11414152: Drive: Rename GData to Drive in extension JS API (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: review fix (comment #7) Created 8 years 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 #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 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // SyncExtensionFunction overrides. 489 // SyncExtensionFunction overrides.
490 virtual bool RunImpl() OVERRIDE; 490 virtual bool RunImpl() OVERRIDE;
491 }; 491 };
492 492
493 // Retrieve property information for multiple files, returning a list of the 493 // Retrieve property information for multiple files, returning a list of the
494 // same length as the input list of file URLs. If a particular file has an 494 // same length as the input list of file URLs. If a particular file has an
495 // error, then return a dictionary with the key "error" set to the error number 495 // error, then return a dictionary with the key "error" set to the error number
496 // (drive::DriveFileError) for that entry in the returned list. 496 // (drive::DriveFileError) for that entry in the returned list.
497 class GetDriveFilePropertiesFunction : public FileBrowserFunction { 497 class GetDriveFilePropertiesFunction : public FileBrowserFunction {
498 public: 498 public:
499 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFileProperties"); 499 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getDriveFileProperties");
500 500
501 GetDriveFilePropertiesFunction(); 501 GetDriveFilePropertiesFunction();
502 502
503 protected: 503 protected:
504 virtual ~GetDriveFilePropertiesFunction(); 504 virtual ~GetDriveFilePropertiesFunction();
505 505
506 void GetNextFileProperties(); 506 void GetNextFileProperties();
507 void CompleteGetFileProperties(); 507 void CompleteGetFileProperties();
508 508
509 // Virtual function that can be overridden to do operations on each virtual 509 // Virtual function that can be overridden to do operations on each virtual
(...skipping 29 matching lines...) Expand all
539 }; 539 };
540 540
541 // Pin/unpin multiple files in the cache, returning a list of file 541 // Pin/unpin multiple files in the cache, returning a list of file
542 // properties with the updated cache state. The returned array is the 542 // properties with the updated cache state. The returned array is the
543 // same length as the input list of file URLs. If a particular file 543 // same length as the input list of file URLs. If a particular file
544 // has an error, then return a dictionary with the key "error" set to 544 // has an error, then return a dictionary with the key "error" set to
545 // the error number (drive::DriveFileError) for that entry in the 545 // the error number (drive::DriveFileError) for that entry in the
546 // returned list. 546 // returned list.
547 class PinDriveFileFunction : public GetDriveFilePropertiesFunction { 547 class PinDriveFileFunction : public GetDriveFilePropertiesFunction {
548 public: 548 public:
549 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinGDataFile"); 549 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.pinDriveFile");
550 550
551 PinDriveFileFunction(); 551 PinDriveFileFunction();
552 552
553 protected: 553 protected:
554 virtual ~PinDriveFileFunction(); 554 virtual ~PinDriveFileFunction();
555 555
556 // AsyncExtensionFunction overrides. 556 // AsyncExtensionFunction overrides.
557 virtual bool RunImpl() OVERRIDE; 557 virtual bool RunImpl() OVERRIDE;
558 558
559 private: 559 private:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 // Get gdata files for the given list of file URLs. Initiate downloading of 597 // Get gdata files for the given list of file URLs. Initiate downloading of
598 // gdata files if these are not cached. Return a list of local file names. 598 // gdata files if these are not cached. Return a list of local file names.
599 // This function puts empty strings instead of local paths for files could 599 // This function puts empty strings instead of local paths for files could
600 // not be obtained. For instance, this can happen if the user specifies a new 600 // not be obtained. For instance, this can happen if the user specifies a new
601 // file name to save a file on gdata. There may be other reasons to fail. The 601 // file name to save a file on gdata. There may be other reasons to fail. The
602 // file manager should check if the local paths returned from getDriveFiles() 602 // file manager should check if the local paths returned from getDriveFiles()
603 // contain empty paths. 603 // contain empty paths.
604 // TODO(satorux): Should we propagate error types to the JavasScript layer? 604 // TODO(satorux): Should we propagate error types to the JavasScript layer?
605 class GetDriveFilesFunction : public FileBrowserFunction { 605 class GetDriveFilesFunction : public FileBrowserFunction {
606 public: 606 public:
607 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataFiles"); 607 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getDriveFiles");
608 608
609 GetDriveFilesFunction(); 609 GetDriveFilesFunction();
610 610
611 protected: 611 protected:
612 virtual ~GetDriveFilesFunction(); 612 virtual ~GetDriveFilesFunction();
613 613
614 // AsyncExtensionFunction overrides. 614 // AsyncExtensionFunction overrides.
615 virtual bool RunImpl() OVERRIDE; 615 virtual bool RunImpl() OVERRIDE;
616 616
617 private: 617 private:
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setPreferences"); 706 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.setPreferences");
707 707
708 protected: 708 protected:
709 virtual ~SetPreferencesFunction() {} 709 virtual ~SetPreferencesFunction() {}
710 710
711 virtual bool RunImpl() OVERRIDE; 711 virtual bool RunImpl() OVERRIDE;
712 }; 712 };
713 713
714 class SearchDriveFunction : public AsyncExtensionFunction { 714 class SearchDriveFunction : public AsyncExtensionFunction {
715 public: 715 public:
716 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.searchGData"); 716 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.searchDrive");
717 717
718 SearchDriveFunction(); 718 SearchDriveFunction();
719 719
720 protected: 720 protected:
721 virtual ~SearchDriveFunction(); 721 virtual ~SearchDriveFunction();
722 722
723 virtual bool RunImpl() OVERRIDE; 723 virtual bool RunImpl() OVERRIDE;
724 724
725 private: 725 private:
726 // Callback fo OpenFileSystem called from RunImpl. 726 // Callback fo OpenFileSystem called from RunImpl.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 private: 807 private:
808 // A callback method to handle the result of 808 // A callback method to handle the result of
809 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread. 809 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
810 void GetLocalPathsResponseOnUIThread(const std::string dest_name, 810 void GetLocalPathsResponseOnUIThread(const std::string dest_name,
811 const SelectedFileInfoList& files); 811 const SelectedFileInfoList& files);
812 812
813 scoped_refptr<extensions::ZipFileCreator> zip_file_creator_; 813 scoped_refptr<extensions::ZipFileCreator> zip_file_creator_;
814 }; 814 };
815 815
816 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ 816 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698