Chromium Code Reviews| 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_ACCESS_OBSERVER_H_ | |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_ACCESS_OBSERVER_H_ | |
| 7 | |
| 8 namespace fileapi { | |
| 9 | |
| 10 class FileSystemURL; | |
| 11 | |
| 12 // An abstract interface to observe file access. | |
| 13 // OnAccess is called whenever an operation reads file contents or metadata. | |
| 14 // (It is called only once per operation regardless of whether the operation | |
| 15 // is recursive or not) | |
| 16 class FileAccessObserver { | |
| 17 public: | |
| 18 FileAccessObserver() {} | |
| 19 virtual ~FileAccessObserver() {} | |
| 20 | |
| 21 virtual void OnAccess(const FileSystemURL& url) = 0; | |
|
jam
2013/10/08 16:07:29
btw we prefer callbacks instead of one method inte
| |
| 22 | |
| 23 private: | |
| 24 DISALLOW_COPY_AND_ASSIGN(FileAccessObserver); | |
| 25 }; | |
| 26 | |
| 27 } // namespace fileapi | |
| 28 | |
| 29 #endif // WEBKIT_BROWSER_FILEAPI_FILE_ACCESS_OBSERVER_H_ | |
| OLD | NEW |