| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERF
ACE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/files/file.h" | 12 #include "base/files/file.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "chrome/browser/chromeos/file_system_provider/observed_entry.h" | 17 #include "chrome/browser/chromeos/file_system_provider/observed_entry.h" |
| 18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse
rver.h" | 18 #include "chrome/browser/chromeos/file_system_provider/provided_file_system_obse
rver.h" |
| 19 #include "storage/browser/fileapi/async_file_util.h" | 19 #include "storage/browser/fileapi/async_file_util.h" |
| 20 #include "url/gurl.h" |
| 20 | 21 |
| 21 class EventRouter; | 22 class EventRouter; |
| 22 | 23 |
| 23 namespace base { | 24 namespace base { |
| 24 class Time; | 25 class Time; |
| 25 } // namespace base | 26 } // namespace base |
| 26 | 27 |
| 27 namespace net { | 28 namespace net { |
| 28 class IOBuffer; | 29 class IOBuffer; |
| 29 } // namespace net | 30 } // namespace net |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 // Requests writing to a file previously opened with |file_handle|. | 171 // Requests writing to a file previously opened with |file_handle|. |
| 171 virtual AbortCallback WriteFile( | 172 virtual AbortCallback WriteFile( |
| 172 int file_handle, | 173 int file_handle, |
| 173 net::IOBuffer* buffer, | 174 net::IOBuffer* buffer, |
| 174 int64 offset, | 175 int64 offset, |
| 175 int length, | 176 int length, |
| 176 const storage::AsyncFileUtil::StatusCallback& callback) = 0; | 177 const storage::AsyncFileUtil::StatusCallback& callback) = 0; |
| 177 | 178 |
| 178 // Requests observing a directory. | 179 // Requests observing a directory. |
| 179 virtual AbortCallback ObserveDirectory( | 180 virtual AbortCallback ObserveDirectory( |
| 181 const GURL& origin, |
| 180 const base::FilePath& directory_path, | 182 const base::FilePath& directory_path, |
| 181 bool recursive, | 183 bool recursive, |
| 184 bool persistent, |
| 182 const storage::AsyncFileUtil::StatusCallback& callback) = 0; | 185 const storage::AsyncFileUtil::StatusCallback& callback) = 0; |
| 183 | 186 |
| 184 // Requests unobserving an entry, which is immediately removed from the | 187 // Requests unobserving an entry, which is immediately removed from the |
| 185 // internal list, hence the operation is not abortable. | 188 // internal list, hence the operation is not abortable. |
| 186 virtual void UnobserveEntry( | 189 virtual void UnobserveEntry( |
| 190 const GURL& origin, |
| 187 const base::FilePath& entry_path, | 191 const base::FilePath& entry_path, |
| 188 bool recursive, | 192 bool recursive, |
| 189 const storage::AsyncFileUtil::StatusCallback& callback) = 0; | 193 const storage::AsyncFileUtil::StatusCallback& callback) = 0; |
| 190 | 194 |
| 191 // Notifies about changes to the observed entries within the file system. | 195 // Notifies about changes to the observed entries within the file system. |
| 192 // Invoked by the file system implementation. Returns false if the | 196 // Invoked by the file system implementation. Returns false if the |
| 193 // notification arguments are malformed or the entry is not observed anymore. | 197 // notification arguments are malformed or the entry is not observed anymore. |
| 194 virtual bool Notify(const base::FilePath& observed_path, | 198 virtual bool Notify(const base::FilePath& observed_path, |
| 195 bool recursive, | 199 bool recursive, |
| 196 ProvidedFileSystemObserver::ChangeType change_type, | 200 ProvidedFileSystemObserver::ChangeType change_type, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 213 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) = 0; | 217 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) = 0; |
| 214 | 218 |
| 215 // Returns a weak pointer to this object. | 219 // Returns a weak pointer to this object. |
| 216 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; | 220 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; |
| 217 }; | 221 }; |
| 218 | 222 |
| 219 } // namespace file_system_provider | 223 } // namespace file_system_provider |
| 220 } // namespace chromeos | 224 } // namespace chromeos |
| 221 | 225 |
| 222 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ | 226 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ |
| OLD | NEW |