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_DRIVE_GDATA_WAPI_FEED_LOADER_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_GDATA_WAPI_FEED_LOADER_OBSERVER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_GDATA_WAPI_FEED_LOADER_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_GDATA_WAPI_FEED_LOADER_OBSERVER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 class FilePath; | 10 class FilePath; |
11 | 11 |
12 namespace gdata { | 12 namespace drive { |
13 | 13 |
14 // Interface for classes that need to observe events from GdataWapiFeedLoader. | 14 // Interface for classes that need to observe events from GdataWapiFeedLoader. |
15 // All events are notified on UI thread. | 15 // All events are notified on UI thread. |
16 class GDataWapiFeedLoaderObserver { | 16 class GDataWapiFeedLoaderObserver { |
17 public: | 17 public: |
18 // Triggered when a content of a directory has been changed. | 18 // Triggered when a content of a directory has been changed. |
19 // |directory_path| is a virtual directory path representing the | 19 // |directory_path| is a virtual directory path representing the |
20 // changed directory. | 20 // changed directory. |
21 virtual void OnDirectoryChanged(const FilePath& directory_path) { | 21 virtual void OnDirectoryChanged(const FilePath& directory_path) { |
22 } | 22 } |
23 | 23 |
24 // Triggered when a document feed is fetched. |num_accumulated_entries| | 24 // Triggered when a document feed is fetched. |num_accumulated_entries| |
25 // tells the number of entries fetched so far. | 25 // tells the number of entries fetched so far. |
26 virtual void OnDocumentFeedFetched(int num_accumulated_entries) { | 26 virtual void OnDocumentFeedFetched(int num_accumulated_entries) { |
27 } | 27 } |
28 | 28 |
29 // Triggered when the feed from the server is loaded. | 29 // Triggered when the feed from the server is loaded. |
30 virtual void OnFeedFromServerLoaded() { | 30 virtual void OnFeedFromServerLoaded() { |
31 } | 31 } |
32 | 32 |
33 protected: | 33 protected: |
34 virtual ~GDataWapiFeedLoaderObserver() {} | 34 virtual ~GDataWapiFeedLoaderObserver() {} |
35 }; | 35 }; |
36 | 36 |
37 } // namespace gdata | 37 } // namespace drive |
38 | 38 |
39 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_GDATA_WAPI_FEED_LOADER_OBSERVER_H_ | 39 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_GDATA_WAPI_FEED_LOADER_OBSERVER_H_ |
OLD | NEW |