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_WAPI_FEED_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_LOADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_LOADER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Callback for handling response from |GDataDocumentsService::GetDocuments|. | 204 // Callback for handling response from |GDataDocumentsService::GetDocuments|. |
205 // Invokes |callback| when done. | 205 // Invokes |callback| when done. |
206 void OnGetDocuments( | 206 void OnGetDocuments( |
207 ContentOrigin initial_origin, | 207 ContentOrigin initial_origin, |
208 const LoadDocumentFeedCallback& callback, | 208 const LoadDocumentFeedCallback& callback, |
209 GetDocumentsParams* params, | 209 GetDocumentsParams* params, |
210 base::TimeTicks start_time, | 210 base::TimeTicks start_time, |
211 GDataErrorCode status, | 211 GDataErrorCode status, |
212 scoped_ptr<base::Value> data); | 212 scoped_ptr<base::Value> data); |
213 | 213 |
| 214 // Callback for handling response from |GDataDocumentsService::GetChanglist|. |
| 215 // Invokes |callback| when done. |
| 216 void OnGetChangelist(ContentOrigin initial_origin, |
| 217 const LoadDocumentFeedCallback& callback, |
| 218 GetDocumentsParams* params, |
| 219 base::TimeTicks start_time, |
| 220 GDataErrorCode status, |
| 221 scoped_ptr<base::Value> data); |
| 222 |
214 // Save filesystem to disk. | 223 // Save filesystem to disk. |
215 void SaveFileSystem(); | 224 void SaveFileSystem(); |
216 | 225 |
217 // Callback for handling UI updates caused by document fetching. | 226 // Callback for handling UI updates caused by document fetching. |
218 void OnNotifyDocumentFeedFetched( | 227 void OnNotifyDocumentFeedFetched( |
219 base::WeakPtr<GetDocumentsUiState> ui_state); | 228 base::WeakPtr<GetDocumentsUiState> ui_state); |
220 | 229 |
221 GDataDirectoryService* directory_service_; // Not owned. | 230 GDataDirectoryService* directory_service_; // Not owned. |
222 DocumentsServiceInterface* documents_service_; // Not owned. | 231 DocumentsServiceInterface* documents_service_; // Not owned. |
223 DriveWebAppsRegistryInterface* webapps_registry_; // Not owned. | 232 DriveWebAppsRegistryInterface* webapps_registry_; // Not owned. |
224 GDataCache* cache_; // Not owned. | 233 GDataCache* cache_; // Not owned. |
225 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 234 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
226 ObserverList<Observer> observers_; | 235 ObserverList<Observer> observers_; |
227 | 236 |
228 // Note: This should remain the last member so it'll be destroyed and | 237 // Note: This should remain the last member so it'll be destroyed and |
229 // invalidate its weak pointers before any other members are destroyed. | 238 // invalidate its weak pointers before any other members are destroyed. |
230 base::WeakPtrFactory<GDataWapiFeedLoader> weak_ptr_factory_; | 239 base::WeakPtrFactory<GDataWapiFeedLoader> weak_ptr_factory_; |
231 DISALLOW_COPY_AND_ASSIGN(GDataWapiFeedLoader); | 240 DISALLOW_COPY_AND_ASSIGN(GDataWapiFeedLoader); |
232 }; | 241 }; |
233 | 242 |
234 } // namespace gdata | 243 } // namespace gdata |
235 | 244 |
236 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_LOADER_H_ | 245 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_LOADER_H_ |
OLD | NEW |