Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / chromeos / fileapi / mtp_file_system_backend_delegate.h
blobe49add08b68449b1af1238334dd579a006056f15
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.
5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h"
11 namespace base {
12 class FilePath;
13 } // namespace base
15 namespace storage {
16 class AsyncFileUtil;
17 class FileSystemContext;
18 class FileStreamReader;
19 class FileSystemURL;
20 class FileStreamWriter;
21 class WatcherManager;
22 } // namespace storage
24 class DeviceMediaAsyncFileUtil;
26 namespace chromeos {
28 // This is delegate interface to inject the MTP device file system in Chrome OS
29 // file API backend.
30 class MTPFileSystemBackendDelegate : public FileSystemBackendDelegate {
31 public:
32 explicit MTPFileSystemBackendDelegate(
33 const base::FilePath& storage_partition_path);
34 ~MTPFileSystemBackendDelegate() override;
36 // FileSystemBackendDelegate overrides.
37 storage::AsyncFileUtil* GetAsyncFileUtil(
38 storage::FileSystemType type) override;
39 scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
40 const storage::FileSystemURL& url,
41 int64 offset,
42 int64 max_bytes_to_read,
43 const base::Time& expected_modification_time,
44 storage::FileSystemContext* context) override;
45 scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter(
46 const storage::FileSystemURL& url,
47 int64 offset,
48 storage::FileSystemContext* context) override;
49 storage::WatcherManager* GetWatcherManager(
50 storage::FileSystemType type) override;
51 void GetRedirectURLForContents(const storage::FileSystemURL& url,
52 const storage::URLCallback& callback) override;
54 private:
55 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_;
57 DISALLOW_COPY_AND_ASSIGN(MTPFileSystemBackendDelegate);
60 } // namespace chromeos
62 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_