Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 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_ | |
| 7 | |
| 8 #include "webkit/browser/fileapi/async_file_util.h" | |
| 9 | |
| 10 class EventRouter; | |
| 11 | |
| 12 namespace chromeos { | |
| 13 namespace file_system_provider { | |
| 14 | |
| 15 class ProvidedFileSystemInfo; | |
| 16 class RequestManager; | |
| 17 | |
| 18 // Interface for a provided file system. Acts as a proxy between providers | |
| 19 // and clients. | |
| 20 // TODO(mtomasz): Add more methods once implemented. | |
| 21 class ProvidedFileSystemInterface { | |
| 22 public: | |
| 23 virtual ~ProvidedFileSystemInterface() {} | |
| 24 | |
| 25 // 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 | |
| 27 // request could not been created, true otherwise. | |
| 28 virtual bool RequestUnmount( | |
| 29 const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; | |
| 30 | |
| 31 // Returns a provided file system info for this file system. | |
| 32 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; | |
| 33 }; | |
| 34 | |
| 35 // Interface for a provided file system factory. | |
| 36 class ProvidedFileSystemFactoryInterface { | |
|
hashimoto
2014/04/15 13:42:00
This interface is unneeded?
mtomasz
2014/04/16 01:04:04
Done.
| |
| 37 public: | |
| 38 virtual ~ProvidedFileSystemFactoryInterface() {} | |
| 39 | |
| 40 // Creates an instance implementing ProvidedFileSystemInterface. | |
| 41 virtual ProvidedFileSystemInterface* Create( | |
| 42 EventRouter* event_router, | |
| 43 RequestManager* request_manager, | |
| 44 const ProvidedFileSystemInfo& file_system_info) = 0; | |
| 45 }; | |
| 46 | |
| 47 } // namespace file_system_provider | |
| 48 } // namespace chromeos | |
| 49 | |
| 50 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INT ERFACE_H_ | |
| OLD | NEW |