Fix the duplicatedly commited composition text when switching IME.
[chromium-blink-merge.git] / chrome / browser / chromeos / fileapi / mtp_file_system_backend_delegate.h
blob6a6d3f34163e9ab6e02ee987055786ecd526522e
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"
10 #include "chrome/browser/chromeos/fileapi/mtp_watcher_manager.h"
12 namespace base {
13 class FilePath;
14 } // namespace base
16 namespace storage {
17 class AsyncFileUtil;
18 class FileSystemContext;
19 class FileStreamReader;
20 class FileSystemURL;
21 class FileStreamWriter;
22 class WatcherManager;
23 } // namespace storage
25 class DeviceMediaAsyncFileUtil;
27 namespace chromeos {
29 // This is delegate interface to inject the MTP device file system in Chrome OS
30 // file API backend.
31 class MTPFileSystemBackendDelegate : public FileSystemBackendDelegate {
32 public:
33 explicit MTPFileSystemBackendDelegate(
34 const base::FilePath& storage_partition_path);
35 ~MTPFileSystemBackendDelegate() override;
37 // FileSystemBackendDelegate overrides.
38 storage::AsyncFileUtil* GetAsyncFileUtil(
39 storage::FileSystemType type) override;
40 scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
41 const storage::FileSystemURL& url,
42 int64 offset,
43 int64 max_bytes_to_read,
44 const base::Time& expected_modification_time,
45 storage::FileSystemContext* context) override;
46 scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter(
47 const storage::FileSystemURL& url,
48 int64 offset,
49 storage::FileSystemContext* context) override;
50 storage::WatcherManager* GetWatcherManager(
51 storage::FileSystemType type) override;
52 void GetRedirectURLForContents(const storage::FileSystemURL& url,
53 const storage::URLCallback& callback) override;
55 private:
56 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_;
57 scoped_ptr<MTPWatcherManager> mtp_watcher_manager_;
59 DISALLOW_COPY_AND_ASSIGN(MTPFileSystemBackendDelegate);
62 } // namespace chromeos
64 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_MTP_FILE_SYSTEM_BACKEND_DELEGATE_H_