Chromium Code Reviews| Index: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h |
| diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..75e513b49e38058020356c8d5f1d62c60caf501f |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h |
| @@ -0,0 +1,57 @@ |
| +// Copyright 2016 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_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEGATE_H_ |
| +#define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEGATE_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h" |
| +#include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" |
| + |
| +namespace storage { |
|
Yusuke Sato
2016/12/13 18:58:56
nit: space between L14/15 if you keep this?
Shuhei Takahashi
2016/12/14 03:24:55
Done.
|
| +class AsyncFileUtil; |
|
Yusuke Sato
2016/12/13 18:58:56
nit: why are these forward declarations necessary?
Shuhei Takahashi
2016/12/14 03:24:55
Thanks, I agree we don't need them.
|
| +class FileSystemContext; |
| +class FileStreamReader; |
| +class FileStreamWriter; |
| +class FileSystemURL; |
| +} // namespace storage |
|
Yusuke Sato
2016/12/13 18:58:56
same
Shuhei Takahashi
2016/12/14 03:24:55
Done.
|
| + |
| +namespace arc { |
| + |
| +// Implements ARC documents provider filesystem. |
| +class ArcDocumentsProviderBackendDelegate |
| + : public chromeos::FileSystemBackendDelegate { |
| + public: |
| + ArcDocumentsProviderBackendDelegate(); |
| + ~ArcDocumentsProviderBackendDelegate() override; |
| + |
| + // FileSystemBackend::Delegate overrides. |
| + storage::AsyncFileUtil* GetAsyncFileUtil( |
| + storage::FileSystemType type) override; |
| + std::unique_ptr<storage::FileStreamReader> CreateFileStreamReader( |
| + const storage::FileSystemURL& url, |
| + int64_t offset, |
| + int64_t max_bytes_to_read, |
| + const base::Time& expected_modification_time, |
| + storage::FileSystemContext* context) override; |
| + std::unique_ptr<storage::FileStreamWriter> CreateFileStreamWriter( |
| + const storage::FileSystemURL& url, |
| + int64_t offset, |
| + storage::FileSystemContext* context) override; |
| + storage::WatcherManager* GetWatcherManager( |
| + storage::FileSystemType type) override; |
| + void GetRedirectURLForContents(const storage::FileSystemURL& url, |
| + const storage::URLCallback& callback) override; |
| + |
| + private: |
| + ArcDocumentsProviderAsyncFileUtil async_file_util_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderBackendDelegate); |
| +}; |
| + |
| +} // namespace arc |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEGATE_H_ |