| 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_DRIVE_FILE_SYSTEM_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_OBSERVER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/chromeos/drive/drive_file_error.h" | 8 #include "chrome/browser/chromeos/drive/drive_file_error.h" |
| 9 | 9 |
| 10 namespace base { |
| 10 class FilePath; | 11 class FilePath; |
| 12 } |
| 11 | 13 |
| 12 namespace drive { | 14 namespace drive { |
| 13 | 15 |
| 14 // Interface for classes that need to observe events from classes implementing | 16 // Interface for classes that need to observe events from classes implementing |
| 15 // DriveFileSystemInterface. | 17 // DriveFileSystemInterface. |
| 16 // All events are notified on UI thread. | 18 // All events are notified on UI thread. |
| 17 class DriveFileSystemObserver { | 19 class DriveFileSystemObserver { |
| 18 public: | 20 public: |
| 19 // Triggered when a content of a directory has been changed. | 21 // Triggered when a content of a directory has been changed. |
| 20 // |directory_path| is a virtual directory path (/drive/...) representing | 22 // |directory_path| is a virtual directory path (/drive/...) representing |
| 21 // changed directory. | 23 // changed directory. |
| 22 virtual void OnDirectoryChanged(const FilePath& directory_path) { | 24 virtual void OnDirectoryChanged(const base::FilePath& directory_path) { |
| 23 } | 25 } |
| 24 | 26 |
| 25 // Triggered when the file system is initially loaded. | 27 // Triggered when the file system is initially loaded. |
| 26 virtual void OnInitialLoadFinished(DriveFileError error) { | 28 virtual void OnInitialLoadFinished(DriveFileError error) { |
| 27 } | 29 } |
| 28 | 30 |
| 29 // Triggered when a document feed is fetched. |num_accumulated_entries| | 31 // Triggered when a document feed is fetched. |num_accumulated_entries| |
| 30 // tells the number of entries fetched so far. | 32 // tells the number of entries fetched so far. |
| 31 virtual void OnResourceListFetched(int num_accumulated_entries) { | 33 virtual void OnResourceListFetched(int num_accumulated_entries) { |
| 32 } | 34 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 43 virtual void OnFileSystemBeingUnmounted() { | 45 virtual void OnFileSystemBeingUnmounted() { |
| 44 } | 46 } |
| 45 | 47 |
| 46 protected: | 48 protected: |
| 47 virtual ~DriveFileSystemObserver() {} | 49 virtual ~DriveFileSystemObserver() {} |
| 48 }; | 50 }; |
| 49 | 51 |
| 50 } // namespace drive | 52 } // namespace drive |
| 51 | 53 |
| 52 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_OBSERVER_H_ | 54 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FILE_SYSTEM_OBSERVER_H_ |
| OLD | NEW |