Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / fileapi / file_system_backend_delegate.h
blobfbf048d9826b8ab4794eb4d3eaf3abedb7024a97
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 "base/platform_file.h"
11 #include "webkit/common/fileapi/file_system_types.h"
13 namespace base {
14 class Time;
15 } // namespace base
17 namespace fileapi {
18 class AsyncFileUtil;
19 class FileSystemContext;
20 class FileSystemOperation;
21 class FileSystemURL;
22 class FileStreamWriter;
23 } // namespace fileapi
25 namespace webkit_blob {
26 class FileStreamReader;
27 } // namespace webkit_blob
29 namespace chromeos {
31 // This is delegate interface to inject the implementation of the some methods
32 // of FileSystemBackend. The main goal is to inject Drive File System.
33 class FileSystemBackendDelegate {
34 public:
35 virtual ~FileSystemBackendDelegate() {}
37 // Called from FileSystemBackend::GetAsyncFileUtil().
38 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
39 fileapi::FileSystemType type) = 0;
41 // Called from FileSystemBackend::CreateFileStreamReader().
42 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
43 const fileapi::FileSystemURL& url,
44 int64 offset,
45 const base::Time& expected_modification_time,
46 fileapi::FileSystemContext* context) = 0;
48 // Called from FileSystemBackend::CreateFileStreamWriter().
49 virtual scoped_ptr<fileapi::FileStreamWriter> CreateFileStreamWriter(
50 const fileapi::FileSystemURL& url,
51 int64 offset,
52 fileapi::FileSystemContext* context) = 0;
55 } // namespace chromeos
57 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_