Add ICU message format support
[chromium-blink-merge.git] / chrome / browser / chromeos / fileapi / file_system_backend_delegate.h
blob7fa02bd11947d567f7121a82ec192c79a4f32ce4
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/callback_forward.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "storage/browser/fileapi/file_system_backend.h"
12 #include "storage/common/fileapi/file_system_types.h"
14 class GURL;
16 namespace base {
17 class Time;
18 } // namespace base
20 namespace storage {
21 class AsyncFileUtil;
22 class FileSystemContext;
23 class FileStreamReader;
24 class FileSystemURL;
25 class FileStreamWriter;
26 class WatcherManager;
27 } // namespace storage
29 namespace chromeos {
31 // This is delegate interface to inject the implementation of the some methods
32 // of FileSystemBackend.
33 class FileSystemBackendDelegate {
34 public:
35 virtual ~FileSystemBackendDelegate() {}
37 // Called from FileSystemBackend::GetAsyncFileUtil().
38 virtual storage::AsyncFileUtil* GetAsyncFileUtil(
39 storage::FileSystemType type) = 0;
41 // Called from FileSystemBackend::CreateFileStreamReader().
42 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
43 const storage::FileSystemURL& url,
44 int64 offset,
45 int64 max_bytes_to_read,
46 const base::Time& expected_modification_time,
47 storage::FileSystemContext* context) = 0;
49 // Called from FileSystemBackend::CreateFileStreamWriter().
50 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter(
51 const storage::FileSystemURL& url,
52 int64 offset,
53 storage::FileSystemContext* context) = 0;
55 // Called from the FileSystemWatcherService class. The returned pointer must
56 // stay valid until shutdown.
57 virtual storage::WatcherManager* GetWatcherManager(
58 storage::FileSystemType type) = 0;
60 // Called from FileSystemBackend::GetRedirectURLForContents. Please ensure
61 // that the returned URL is secure to be opened in a browser tab, or referred
62 // from <img>, <video>, XMLHttpRequest, etc...
63 virtual void GetRedirectURLForContents(
64 const storage::FileSystemURL& url,
65 const storage::URLCallback& callback) = 0;
68 } // namespace chromeos
70 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_