1 // Copyright 2013 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_FILE_SYSTEM_BACKEND_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "webkit/common/fileapi/file_system_types.h"
18 class FileSystemContext;
20 class FileStreamWriter;
21 } // namespace fileapi
23 namespace webkit_blob {
24 class FileStreamReader;
25 } // namespace webkit_blob
29 // This is delegate interface to inject the implementation of the some methods
30 // of FileSystemBackend. The main goal is to inject Drive File System.
31 class FileSystemBackendDelegate {
33 virtual ~FileSystemBackendDelegate() {}
35 // Called from FileSystemBackend::GetAsyncFileUtil().
36 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
37 fileapi::FileSystemType type) = 0;
39 // Called from FileSystemBackend::CreateFileStreamReader().
40 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
41 const fileapi::FileSystemURL& url,
43 const base::Time& expected_modification_time,
44 fileapi::FileSystemContext* context) = 0;
46 // Called from FileSystemBackend::CreateFileStreamWriter().
47 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter(
48 const fileapi::FileSystemURL& url,
50 fileapi::FileSystemContext* context) = 0;
53 } // namespace chromeos
55 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_