| 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 "webkit/browser/fileapi/async_file_util.h" | 8 #include "webkit/browser/fileapi/async_file_util.h" |
| 9 | 9 |
| 10 class EventRouter; | 10 class EventRouter; |
| 11 | 11 |
| 12 namespace base { |
| 13 class FilePath; |
| 14 } // namespace base |
| 15 |
| 12 namespace chromeos { | 16 namespace chromeos { |
| 13 namespace file_system_provider { | 17 namespace file_system_provider { |
| 14 | 18 |
| 15 class ProvidedFileSystemInfo; | 19 class ProvidedFileSystemInfo; |
| 16 class RequestManager; | 20 class RequestManager; |
| 17 | 21 |
| 18 // Interface for a provided file system. Acts as a proxy between providers | 22 // Interface for a provided file system. Acts as a proxy between providers |
| 19 // and clients. | 23 // and clients. |
| 20 // TODO(mtomasz): Add more methods once implemented. | 24 // TODO(mtomasz): Add more methods once implemented. |
| 21 class ProvidedFileSystemInterface { | 25 class ProvidedFileSystemInterface { |
| 22 public: | 26 public: |
| 23 virtual ~ProvidedFileSystemInterface() {} | 27 virtual ~ProvidedFileSystemInterface() {} |
| 24 | 28 |
| 25 // Requests unmounting of the file system. The callback is called when the | 29 // Requests unmounting of the file system. The callback is called when the |
| 26 // request is accepted or rejected, with an error code. Returns false if the | 30 // request is accepted or rejected, with an error code. |
| 27 // request could not been created, true otherwise. | 31 virtual void RequestUnmount( |
| 28 virtual bool RequestUnmount( | |
| 29 const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; | 32 const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; |
| 30 | 33 |
| 31 // Returns a provided file system info for this file system. | 34 // Returns a provided file system info for this file system. |
| 32 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; | 35 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; |
| 33 | 36 |
| 34 // Returns a request manager for the file system. | 37 // Returns a request manager for the file system. |
| 35 virtual RequestManager* GetRequestManager() = 0; | 38 virtual RequestManager* GetRequestManager() = 0; |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 } // namespace file_system_provider | 41 } // namespace file_system_provider |
| 39 } // namespace chromeos | 42 } // namespace chromeos |
| 40 | 43 |
| 41 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ | 44 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT
ERFACE_H_ |
| OLD | NEW |