| 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 WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/process/process.h" | 13 #include "base/process/process.h" |
| 14 #include "webkit/browser/fileapi/file_system_operation_context.h" | 14 #include "webkit/browser/fileapi/file_system_operation_context.h" |
| 15 #include "webkit/browser/webkit_storage_browser_export.h" | 15 #include "webkit/browser/webkit_storage_browser_export.h" |
| 16 #include "webkit/common/fileapi/directory_entry.h" | 16 #include "webkit/common/fileapi/directory_entry.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class Time; | 19 class Time; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace net { | 22 namespace net { |
| 23 class URLRequest; | 23 class URLRequest; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace webkit_blob { | 26 namespace storage { |
| 27 class ShareableFileReference; | 27 class ShareableFileReference; |
| 28 } | 28 } |
| 29 | 29 |
| 30 class GURL; | 30 class GURL; |
| 31 | 31 |
| 32 namespace fileapi { | 32 namespace storage { |
| 33 | 33 |
| 34 class FileSystemContext; | 34 class FileSystemContext; |
| 35 class FileSystemURL; | 35 class FileSystemURL; |
| 36 class FileWriterDelegate; | 36 class FileWriterDelegate; |
| 37 | 37 |
| 38 // The interface class for FileSystemOperation implementations. | 38 // The interface class for FileSystemOperation implementations. |
| 39 // | 39 // |
| 40 // This interface defines file system operations required to implement | 40 // This interface defines file system operations required to implement |
| 41 // "File API: Directories and System" | 41 // "File API: Directories and System" |
| 42 // http://www.w3.org/TR/file-system-api/ | 42 // http://www.w3.org/TR/file-system-api/ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // return NULL. In a more complex case, the implementaiton can manage | 110 // return NULL. In a more complex case, the implementaiton can manage |
| 111 // the lifetime of the snapshot file on its own (e.g. by its cache system) | 111 // the lifetime of the snapshot file on its own (e.g. by its cache system) |
| 112 // but also can be notified via the reference when the file becomes no | 112 // but also can be notified via the reference when the file becomes no |
| 113 // longer necessary in the javascript world. | 113 // longer necessary in the javascript world. |
| 114 // Please see the comment for ShareableFileReference for details. | 114 // Please see the comment for ShareableFileReference for details. |
| 115 // | 115 // |
| 116 typedef base::Callback< | 116 typedef base::Callback< |
| 117 void(base::File::Error result, | 117 void(base::File::Error result, |
| 118 const base::File::Info& file_info, | 118 const base::File::Info& file_info, |
| 119 const base::FilePath& platform_path, | 119 const base::FilePath& platform_path, |
| 120 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref)> | 120 const scoped_refptr<storage::ShareableFileReference>& file_ref)> |
| 121 SnapshotFileCallback; | 121 SnapshotFileCallback; |
| 122 | 122 |
| 123 // Used for progress update callback for Copy(). | 123 // Used for progress update callback for Copy(). |
| 124 // | 124 // |
| 125 // BEGIN_COPY_ENTRY is fired for each copy creation beginning (for both | 125 // BEGIN_COPY_ENTRY is fired for each copy creation beginning (for both |
| 126 // file and directory). | 126 // file and directory). |
| 127 // The |source_url| is the URL of the source entry. |size| should not be | 127 // The |source_url| is the URL of the source entry. |size| should not be |
| 128 // used. | 128 // used. |
| 129 // | 129 // |
| 130 // END_COPY_ENTRY is fired for each copy creation finishing (for both | 130 // END_COPY_ENTRY is fired for each copy creation finishing (for both |
| 131 // file and directory). | 131 // file and directory). |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 kOperationWrite, | 473 kOperationWrite, |
| 474 kOperationTruncate, | 474 kOperationTruncate, |
| 475 kOperationTouchFile, | 475 kOperationTouchFile, |
| 476 kOperationOpenFile, | 476 kOperationOpenFile, |
| 477 kOperationCloseFile, | 477 kOperationCloseFile, |
| 478 kOperationGetLocalPath, | 478 kOperationGetLocalPath, |
| 479 kOperationCancel, | 479 kOperationCancel, |
| 480 }; | 480 }; |
| 481 }; | 481 }; |
| 482 | 482 |
| 483 } // namespace fileapi | 483 } // namespace storage |
| 484 | 484 |
| 485 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ | 485 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ |
| OLD | NEW |