Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: webkit/browser/fileapi/file_change_observer.h

Issue 26280007: Split file_observers.h into three files for each class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webkit/browser/fileapi/file_change_observer.h
diff --git a/webkit/browser/fileapi/file_change_observer.h b/webkit/browser/fileapi/file_change_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..308520bd08292e964a101dd013727ff1d6ab480e
--- /dev/null
+++ b/webkit/browser/fileapi/file_change_observer.h
@@ -0,0 +1,37 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WEBKIT_BROWSER_FILEAPI_FILE_CHANGE_OBSERVER_H_
+#define WEBKIT_BROWSER_FILEAPI_FILE_CHANGE_OBSERVER_H_
+
+namespace fileapi {
+
+class FileSystemURL;
+
+// An abstract interface to observe file changes.
+// Each method of this class is called once per file/directory is created,
+// removed or modified. For recursive operations each method is called for
+// each subdirectory/subfile. Currently ChangeObserver is only supported
+// by the local sandbox file system.
+class FileChangeObserver {
+ public:
+ FileChangeObserver() {}
+ virtual ~FileChangeObserver() {}
+
+ virtual void OnCreateFile(const FileSystemURL& url) = 0;
+ virtual void OnCreateFileFrom(const FileSystemURL& url,
+ const FileSystemURL& src) = 0;
+ virtual void OnRemoveFile(const FileSystemURL& url) = 0;
+ virtual void OnModifyFile(const FileSystemURL& url) = 0;
+
+ virtual void OnCreateDirectory(const FileSystemURL& url) = 0;
+ virtual void OnRemoveDirectory(const FileSystemURL& url) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FileChangeObserver);
+};
+
+} // namespace fileapi
+
+#endif // WEBKIT_BROWSER_FILEAPI_FILE_CHANGE_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698