Chromium Code Reviews| Index: chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h |
| diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4565fe888a14247c76a5dbd0095e7ce92162e88c |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h |
| @@ -0,0 +1,50 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERFACE_H_ |
| +#define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERFACE_H_ |
| + |
| +#include "webkit/browser/fileapi/async_file_util.h" |
| + |
| +class EventRouter; |
| + |
| +namespace chromeos { |
| +namespace file_system_provider { |
| + |
| +class ProvidedFileSystemInfo; |
| +class RequestManager; |
| + |
| +// Interface for a provided file system. Acts as a proxy between providers |
| +// and clients. |
| +// TODO(mtomasz): Add more methods once implemented. |
| +class ProvidedFileSystemInterface { |
| + public: |
| + virtual ~ProvidedFileSystemInterface() {} |
| + |
| + // Requests unmounting of the file system. The callback is called when the |
| + // request is accepted or rejected, with an error code. Returns false if the |
| + // request could not been created, true otherwise. |
| + virtual bool RequestUnmount( |
| + const fileapi::AsyncFileUtil::StatusCallback& callback) = 0; |
| + |
| + // Returns a provided file system info for this file system. |
| + virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0; |
| +}; |
| + |
| +// Interface for a provided file system factory. |
| +class ProvidedFileSystemFactoryInterface { |
|
hashimoto
2014/04/15 13:42:00
This interface is unneeded?
mtomasz
2014/04/16 01:04:04
Done.
|
| + public: |
| + virtual ~ProvidedFileSystemFactoryInterface() {} |
| + |
| + // Creates an instance implementing ProvidedFileSystemInterface. |
| + virtual ProvidedFileSystemInterface* Create( |
| + EventRouter* event_router, |
| + RequestManager* request_manager, |
| + const ProvidedFileSystemInfo& file_system_info) = 0; |
| +}; |
| + |
| +} // namespace file_system_provider |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INTERFACE_H_ |