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/abort_callback.h" |
17 #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" |
18 #include "chrome/browser/chromeos/file_system_provider/watcher.h" | 19 #include "chrome/browser/chromeos/file_system_provider/watcher.h" |
19 #include "storage/browser/fileapi/async_file_util.h" | 20 #include "storage/browser/fileapi/async_file_util.h" |
20 #include "storage/browser/fileapi/watcher_manager.h" | 21 #include "storage/browser/fileapi/watcher_manager.h" |
21 #include "url/gurl.h" | 22 #include "url/gurl.h" |
22 | 23 |
23 class EventRouter; | 24 class EventRouter; |
24 | 25 |
25 namespace base { | 26 namespace base { |
26 class Time; | 27 class Time; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 typedef base::Callback<void(int file_handle, base::File::Error result)> | 74 typedef base::Callback<void(int file_handle, base::File::Error result)> |
74 OpenFileCallback; | 75 OpenFileCallback; |
75 | 76 |
76 typedef base::Callback< | 77 typedef base::Callback< |
77 void(int chunk_length, bool has_more, base::File::Error result)> | 78 void(int chunk_length, bool has_more, base::File::Error result)> |
78 ReadChunkReceivedCallback; | 79 ReadChunkReceivedCallback; |
79 | 80 |
80 typedef base::Callback<void(scoped_ptr<EntryMetadata> entry_metadata, | 81 typedef base::Callback<void(scoped_ptr<EntryMetadata> entry_metadata, |
81 base::File::Error result)> GetMetadataCallback; | 82 base::File::Error result)> GetMetadataCallback; |
82 | 83 |
83 typedef base::Callback<void( | |
84 const storage::AsyncFileUtil::StatusCallback& callback)> AbortCallback; | |
85 | |
86 // Mask of fields requested from the GetMetadata() call. | 84 // Mask of fields requested from the GetMetadata() call. |
87 typedef int MetadataFieldMask; | 85 typedef int MetadataFieldMask; |
88 | 86 |
89 virtual ~ProvidedFileSystemInterface() {} | 87 virtual ~ProvidedFileSystemInterface() {} |
90 | 88 |
91 // Requests unmounting of the file system. The callback is called when the | 89 // Requests unmounting of the file system. The callback is called when the |
92 // request is accepted or rejected, with an error code. | 90 // request is accepted or rejected, with an error code. |
93 virtual AbortCallback RequestUnmount( | 91 virtual AbortCallback RequestUnmount( |
94 const storage::AsyncFileUtil::StatusCallback& callback) = 0; | 92 const storage::AsyncFileUtil::StatusCallback& callback) = 0; |
95 | 93 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) = 0; | 224 virtual void RemoveObserver(ProvidedFileSystemObserver* observer) = 0; |
227 | 225 |
228 // Returns a weak pointer to this object. | 226 // Returns a weak pointer to this object. |
229 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; | 227 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() = 0; |
230 }; | 228 }; |
231 | 229 |
232 } // namespace file_system_provider | 230 } // namespace file_system_provider |
233 } // namespace chromeos | 231 } // namespace chromeos |
234 | 232 |
235 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ | 233 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ |
OLD | NEW |