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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // Callback for handling response from |GDataDocumentsService::GetDocuments|. | 186 // Callback for handling response from |GDataDocumentsService::GetDocuments|. |
187 // Invokes |callback| when done. | 187 // Invokes |callback| when done. |
188 void OnGetDocuments( | 188 void OnGetDocuments( |
189 ContentOrigin initial_origin, | 189 ContentOrigin initial_origin, |
190 const LoadDocumentFeedCallback& callback, | 190 const LoadDocumentFeedCallback& callback, |
191 GetDocumentsParams* params, | 191 GetDocumentsParams* params, |
192 base::TimeTicks start_time, | 192 base::TimeTicks start_time, |
193 GDataErrorCode status, | 193 GDataErrorCode status, |
194 scoped_ptr<base::Value> data); | 194 scoped_ptr<base::Value> data); |
195 | 195 |
| 196 // Callback for handling response from |GDataDocumentsService::GetChanglist|. |
| 197 // Invokes |callback| when done. |
| 198 void OnGetChangelist(ContentOrigin initial_origin, |
| 199 const LoadDocumentFeedCallback& callback, |
| 200 GetDocumentsParams* params, |
| 201 base::TimeTicks start_time, |
| 202 GDataErrorCode status, |
| 203 scoped_ptr<base::Value> data); |
| 204 |
196 // Save filesystem to disk. | 205 // Save filesystem to disk. |
197 void SaveFileSystem(); | 206 void SaveFileSystem(); |
198 | 207 |
199 // Callback for handling UI updates caused by document fetching. | 208 // Callback for handling UI updates caused by document fetching. |
200 void OnNotifyDocumentFeedFetched( | 209 void OnNotifyDocumentFeedFetched( |
201 base::WeakPtr<GetDocumentsUiState> ui_state); | 210 base::WeakPtr<GetDocumentsUiState> ui_state); |
202 | 211 |
203 GDataDirectoryService* directory_service_; // Not owned. | 212 GDataDirectoryService* directory_service_; // Not owned. |
204 DocumentsServiceInterface* documents_service_; // Not owned. | 213 DocumentsServiceInterface* documents_service_; // Not owned. |
205 DriveWebAppsRegistryInterface* webapps_registry_; // Not owned. | 214 DriveWebAppsRegistryInterface* webapps_registry_; // Not owned. |
206 GDataCache* cache_; // Not owned. | 215 GDataCache* cache_; // Not owned. |
207 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 216 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
208 ObserverList<Observer> observers_; | 217 ObserverList<Observer> observers_; |
209 | 218 |
210 // Note: This should remain the last member so it'll be destroyed and | 219 // Note: This should remain the last member so it'll be destroyed and |
211 // invalidate its weak pointers before any other members are destroyed. | 220 // invalidate its weak pointers before any other members are destroyed. |
212 base::WeakPtrFactory<GDataWapiFeedLoader> weak_ptr_factory_; | 221 base::WeakPtrFactory<GDataWapiFeedLoader> weak_ptr_factory_; |
213 DISALLOW_COPY_AND_ASSIGN(GDataWapiFeedLoader); | 222 DISALLOW_COPY_AND_ASSIGN(GDataWapiFeedLoader); |
214 }; | 223 }; |
215 | 224 |
216 } // namespace gdata | 225 } // namespace gdata |
217 | 226 |
218 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_LOADER_H_ | 227 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_LOADER_H_ |
OLD | NEW |