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_GDATA_GDATA_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 FOUND_INVALID, | 137 FOUND_INVALID, |
138 // Found missing directory segment while searching for given directory. | 138 // Found missing directory segment while searching for given directory. |
139 FOUND_MISSING, | 139 FOUND_MISSING, |
140 // Found target directory, it already exists. | 140 // Found target directory, it already exists. |
141 DIRECTORY_ALREADY_PRESENT, | 141 DIRECTORY_ALREADY_PRESENT, |
142 }; | 142 }; |
143 | 143 |
144 // Defines set of parameters sent to callback OnGetDocuments(). | 144 // Defines set of parameters sent to callback OnGetDocuments(). |
145 struct GetDocumentsParams; | 145 struct GetDocumentsParams; |
146 | 146 |
| 147 // Defines set of parameters sent to callback OnNotifyDocumentFeedFetched(). |
| 148 struct GetDocumentsUiState; |
| 149 |
147 // Defines set of parameters passes to intermediate callbacks during | 150 // Defines set of parameters passes to intermediate callbacks during |
148 // execution of CreateDirectory() method. | 151 // execution of CreateDirectory() method. |
149 struct CreateDirectoryParams; | 152 struct CreateDirectoryParams; |
150 | 153 |
151 // Defines set of parameters passed to an intermediate callback | 154 // Defines set of parameters passed to an intermediate callback |
152 // OnGetFileCompleteForOpen, during execution of OpenFile() method. | 155 // OnGetFileCompleteForOpen, during execution of OpenFile() method. |
153 struct GetFileCompleteForOpenParams; | 156 struct GetFileCompleteForOpenParams; |
154 | 157 |
155 // Defines set of parameters passed to intermediate callbacks during | 158 // Defines set of parameters passed to intermediate callbacks during |
156 // execution of GetFileByPath() method. | 159 // execution of GetFileByPath() method. |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 // Callback for handling root directory refresh from the cache. | 635 // Callback for handling root directory refresh from the cache. |
633 void OnProtoLoaded(LoadRootFeedParams* params); | 636 void OnProtoLoaded(LoadRootFeedParams* params); |
634 | 637 |
635 // Save filesystem as proto file. | 638 // Save filesystem as proto file. |
636 void SaveFileSystemAsProto(); | 639 void SaveFileSystemAsProto(); |
637 | 640 |
638 // Notifies events to observers on UI thread. | 641 // Notifies events to observers on UI thread. |
639 void NotifyDirectoryChanged(const FilePath& directory_path); | 642 void NotifyDirectoryChanged(const FilePath& directory_path); |
640 void NotifyDocumentFeedFetched(int num_accumulated_entries); | 643 void NotifyDocumentFeedFetched(int num_accumulated_entries); |
641 | 644 |
| 645 // Callback for handling UI updates caused by document fetching. |
| 646 void OnNotifyDocumentFeedFetched( |
| 647 base::WeakPtr<GetDocumentsUiState> ui_state); |
| 648 |
642 // Runs the callback and notifies that the initial load is finished. | 649 // Runs the callback and notifies that the initial load is finished. |
643 void RunAndNotifyInitialLoadFinished( | 650 void RunAndNotifyInitialLoadFinished( |
644 const FindEntryCallback& callback, | 651 const FindEntryCallback& callback, |
645 GDataFileError error, | 652 GDataFileError error, |
646 GDataEntry* entry); | 653 GDataEntry* entry); |
647 | 654 |
648 // Helper function that completes bookkeeping tasks related to | 655 // Helper function that completes bookkeeping tasks related to |
649 // completed file transfer. | 656 // completed file transfer. |
650 void OnTransferCompleted( | 657 void OnTransferCompleted( |
651 const FileOperationCallback& callback, | 658 const FileOperationCallback& callback, |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 916 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
910 | 917 |
911 ObserverList<Observer> observers_; | 918 ObserverList<Observer> observers_; |
912 | 919 |
913 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 920 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
914 }; | 921 }; |
915 | 922 |
916 } // namespace gdata | 923 } // namespace gdata |
917 | 924 |
918 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 925 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |