| OLD | NEW |
| 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 <string> | 9 #include <string> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 582 |
| 583 private: | 583 private: |
| 584 // A callback method to handle the result of | 584 // A callback method to handle the result of |
| 585 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread. | 585 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread. |
| 586 void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files); | 586 void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files); |
| 587 | 587 |
| 588 // Gets the file on the top of the |remaining_gdata_paths_| or sends the | 588 // Gets the file on the top of the |remaining_gdata_paths_| or sends the |
| 589 // response if the queue is empty. | 589 // response if the queue is empty. |
| 590 void GetFileOrSendResponse(); | 590 void GetFileOrSendResponse(); |
| 591 | 591 |
| 592 // Called by GDataFileSystem::GetFile(). Pops the file from | 592 // Called by DriveFileSystem::GetFile(). Pops the file from |
| 593 // |remaining_gdata_paths_|, and calls GetFileOrSendResponse(). | 593 // |remaining_gdata_paths_|, and calls GetFileOrSendResponse(). |
| 594 void OnFileReady(gdata::DriveFileError error, | 594 void OnFileReady(gdata::DriveFileError error, |
| 595 const FilePath& local_path, | 595 const FilePath& local_path, |
| 596 const std::string& unused_mime_type, | 596 const std::string& unused_mime_type, |
| 597 gdata::DriveFileType file_type); | 597 gdata::DriveFileType file_type); |
| 598 | 598 |
| 599 std::queue<FilePath> remaining_gdata_paths_; | 599 std::queue<FilePath> remaining_gdata_paths_; |
| 600 ListValue* local_paths_; | 600 ListValue* local_paths_; |
| 601 }; | 601 }; |
| 602 | 602 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 virtual ~TransferFileFunction(); | 644 virtual ~TransferFileFunction(); |
| 645 | 645 |
| 646 // AsyncExtensionFunction overrides. | 646 // AsyncExtensionFunction overrides. |
| 647 virtual bool RunImpl() OVERRIDE; | 647 virtual bool RunImpl() OVERRIDE; |
| 648 | 648 |
| 649 private: | 649 private: |
| 650 // Helper callback for handling response from | 650 // Helper callback for handling response from |
| 651 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread() | 651 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread() |
| 652 void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files); | 652 void GetLocalPathsResponseOnUIThread(const SelectedFileInfoList& files); |
| 653 | 653 |
| 654 // Helper callback for handling response from GDataFileSystem::TransferFile(). | 654 // Helper callback for handling response from DriveFileSystem::TransferFile(). |
| 655 void OnTransferCompleted(gdata::DriveFileError error); | 655 void OnTransferCompleted(gdata::DriveFileError error); |
| 656 }; | 656 }; |
| 657 | 657 |
| 658 // Read setting value. | 658 // Read setting value. |
| 659 class GetGDataPreferencesFunction : public SyncExtensionFunction { | 659 class GetGDataPreferencesFunction : public SyncExtensionFunction { |
| 660 public: | 660 public: |
| 661 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataPreferences"); | 661 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.getGDataPreferences"); |
| 662 | 662 |
| 663 protected: | 663 protected: |
| 664 virtual ~GetGDataPreferencesFunction() {} | 664 virtual ~GetGDataPreferencesFunction() {} |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 DECLARE_EXTENSION_FUNCTION_NAME( | 735 DECLARE_EXTENSION_FUNCTION_NAME( |
| 736 "fileBrowserPrivate.requestDirectoryRefresh"); | 736 "fileBrowserPrivate.requestDirectoryRefresh"); |
| 737 | 737 |
| 738 protected: | 738 protected: |
| 739 virtual ~RequestDirectoryRefreshFunction() {} | 739 virtual ~RequestDirectoryRefreshFunction() {} |
| 740 | 740 |
| 741 virtual bool RunImpl() OVERRIDE; | 741 virtual bool RunImpl() OVERRIDE; |
| 742 }; | 742 }; |
| 743 | 743 |
| 744 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ | 744 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ |
| OLD | NEW |