| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
| 6 #define WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <stack> | 9 #include <stack> |
| 10 | 10 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 virtual void OnCancel() OVERRIDE; | 115 virtual void OnCancel() OVERRIDE; |
| 116 | 116 |
| 117 private: | 117 private: |
| 118 void DidCopyOrMoveFile(const FileSystemURL& src_url, | 118 void DidCopyOrMoveFile(const FileSystemURL& src_url, |
| 119 const FileSystemURL& dest_url, | 119 const FileSystemURL& dest_url, |
| 120 const StatusCallback& callback, | 120 const StatusCallback& callback, |
| 121 CopyOrMoveImpl* impl, | 121 CopyOrMoveImpl* impl, |
| 122 base::PlatformFileError error); | 122 base::File::Error error); |
| 123 void DidTryRemoveDestRoot(const StatusCallback& callback, | 123 void DidTryRemoveDestRoot(const StatusCallback& callback, |
| 124 base::PlatformFileError error); | 124 base::File::Error error); |
| 125 void ProcessDirectoryInternal(const FileSystemURL& src_url, | 125 void ProcessDirectoryInternal(const FileSystemURL& src_url, |
| 126 const FileSystemURL& dest_url, | 126 const FileSystemURL& dest_url, |
| 127 const StatusCallback& callback); | 127 const StatusCallback& callback); |
| 128 void DidCreateDirectory(const FileSystemURL& src_url, | 128 void DidCreateDirectory(const FileSystemURL& src_url, |
| 129 const FileSystemURL& dest_url, | 129 const FileSystemURL& dest_url, |
| 130 const StatusCallback& callback, | 130 const StatusCallback& callback, |
| 131 base::PlatformFileError error); | 131 base::File::Error error); |
| 132 void PostProcessDirectoryAfterGetMetadata( | 132 void PostProcessDirectoryAfterGetMetadata( |
| 133 const FileSystemURL& src_url, | 133 const FileSystemURL& src_url, |
| 134 const StatusCallback& callback, | 134 const StatusCallback& callback, |
| 135 base::PlatformFileError error, | 135 base::File::Error error, |
| 136 const base::PlatformFileInfo& file_info); | 136 const base::File::Info& file_info); |
| 137 void PostProcessDirectoryAfterTouchFile(const FileSystemURL& src_url, | 137 void PostProcessDirectoryAfterTouchFile(const FileSystemURL& src_url, |
| 138 const StatusCallback& callback, | 138 const StatusCallback& callback, |
| 139 base::PlatformFileError error); | 139 base::File::Error error); |
| 140 void DidRemoveSourceForMove(const StatusCallback& callback, | 140 void DidRemoveSourceForMove(const StatusCallback& callback, |
| 141 base::PlatformFileError error); | 141 base::File::Error error); |
| 142 | 142 |
| 143 void OnCopyFileProgress(const FileSystemURL& src_url, int64 size); | 143 void OnCopyFileProgress(const FileSystemURL& src_url, int64 size); |
| 144 FileSystemURL CreateDestURL(const FileSystemURL& src_url) const; | 144 FileSystemURL CreateDestURL(const FileSystemURL& src_url) const; |
| 145 | 145 |
| 146 FileSystemURL src_root_; | 146 FileSystemURL src_root_; |
| 147 FileSystemURL dest_root_; | 147 FileSystemURL dest_root_; |
| 148 bool same_file_system_; | 148 bool same_file_system_; |
| 149 OperationType operation_type_; | 149 OperationType operation_type_; |
| 150 CopyOrMoveOption option_; | 150 CopyOrMoveOption option_; |
| 151 CopyProgressCallback progress_callback_; | 151 CopyProgressCallback progress_callback_; |
| 152 StatusCallback callback_; | 152 StatusCallback callback_; |
| 153 | 153 |
| 154 std::set<CopyOrMoveImpl*> running_copy_set_; | 154 std::set<CopyOrMoveImpl*> running_copy_set_; |
| 155 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; | 155 base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; |
| 156 | 156 |
| 157 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); | 157 DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace fileapi | 160 } // namespace fileapi |
| 161 | 161 |
| 162 #endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ | 162 #endif // WEBKIT_BROWSER_FILEAPI_COPY_OR_MOVE_OPERATION_DELEGATE_H_ |
| OLD | NEW |