OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_CHANGE_OBSERVER_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_CHANGE_OBSERVER_H_ |
| 7 |
| 8 namespace fileapi { |
| 9 |
| 10 class FileSystemURL; |
| 11 |
| 12 // An abstract interface to observe file changes. |
| 13 // Each method of this class is called once per file/directory is created, |
| 14 // removed or modified. For recursive operations each method is called for |
| 15 // each subdirectory/subfile. Currently ChangeObserver is only supported |
| 16 // by the local sandbox file system. |
| 17 class FileChangeObserver { |
| 18 public: |
| 19 FileChangeObserver() {} |
| 20 virtual ~FileChangeObserver() {} |
| 21 |
| 22 virtual void OnCreateFile(const FileSystemURL& url) = 0; |
| 23 virtual void OnCreateFileFrom(const FileSystemURL& url, |
| 24 const FileSystemURL& src) = 0; |
| 25 virtual void OnRemoveFile(const FileSystemURL& url) = 0; |
| 26 virtual void OnModifyFile(const FileSystemURL& url) = 0; |
| 27 |
| 28 virtual void OnCreateDirectory(const FileSystemURL& url) = 0; |
| 29 virtual void OnRemoveDirectory(const FileSystemURL& url) = 0; |
| 30 |
| 31 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(FileChangeObserver); |
| 33 }; |
| 34 |
| 35 } // namespace fileapi |
| 36 |
| 37 #endif // WEBKIT_BROWSER_FILEAPI_FILE_CHANGE_OBSERVER_H_ |
OLD | NEW |