Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/browser/chromeos/fileapi/file_system_backend_delegate.h

Issue 527773003: Add GetURLForBrowserTab method to the external file system backend. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_
6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ 6 #define CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "webkit/browser/fileapi/file_system_backend.h"
10 #include "webkit/common/fileapi/file_system_types.h" 12 #include "webkit/common/fileapi/file_system_types.h"
11 13
14 class GURL;
15
12 namespace base { 16 namespace base {
13 class Time; 17 class Time;
14 } // namespace base 18 } // namespace base
15 19
16 namespace storage { 20 namespace storage {
17 class AsyncFileUtil; 21 class AsyncFileUtil;
18 class FileSystemContext; 22 class FileSystemContext;
19 class FileStreamReader; 23 class FileStreamReader;
20 class FileSystemURL; 24 class FileSystemURL;
21 class FileStreamWriter; 25 class FileStreamWriter;
22 class WatcherManager; 26 class WatcherManager;
23 } // namespace storage 27 } // namespace storage
24 28
25 namespace storage {
26 class FileStreamReader;
27 } // namespace storage
28
29 namespace chromeos { 29 namespace chromeos {
30 30
31 // This is delegate interface to inject the implementation of the some methods 31 // This is delegate interface to inject the implementation of the some methods
32 // of FileSystemBackend. 32 // of FileSystemBackend.
33 class FileSystemBackendDelegate { 33 class FileSystemBackendDelegate {
34 public: 34 public:
35 virtual ~FileSystemBackendDelegate() {} 35 virtual ~FileSystemBackendDelegate() {}
36 36
37 // Called from FileSystemBackend::GetAsyncFileUtil(). 37 // Called from FileSystemBackend::GetAsyncFileUtil().
38 virtual storage::AsyncFileUtil* GetAsyncFileUtil( 38 virtual storage::AsyncFileUtil* GetAsyncFileUtil(
39 storage::FileSystemType type) = 0; 39 storage::FileSystemType type) = 0;
40 40
41 // Called from FileSystemBackend::CreateFileStreamReader(). 41 // Called from FileSystemBackend::CreateFileStreamReader().
42 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader( 42 virtual scoped_ptr<storage::FileStreamReader> CreateFileStreamReader(
43 const storage::FileSystemURL& url, 43 const storage::FileSystemURL& url,
44 int64 offset, 44 int64 offset,
45 const base::Time& expected_modification_time, 45 const base::Time& expected_modification_time,
46 storage::FileSystemContext* context) = 0; 46 storage::FileSystemContext* context) = 0;
47 47
48 // Called from FileSystemBackend::CreateFileStreamWriter(). 48 // Called from FileSystemBackend::CreateFileStreamWriter().
49 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter( 49 virtual scoped_ptr<storage::FileStreamWriter> CreateFileStreamWriter(
50 const storage::FileSystemURL& url, 50 const storage::FileSystemURL& url,
51 int64 offset, 51 int64 offset,
52 storage::FileSystemContext* context) = 0; 52 storage::FileSystemContext* context) = 0;
53 53
54 // Called from the FileSystemWatcherService class. The returned pointer must 54 // Called from the FileSystemWatcherService class. The returned pointer must
55 // stay valid until shutdown. 55 // stay valid until shutdown.
56 virtual storage::WatcherManager* GetWatcherManager( 56 virtual storage::WatcherManager* GetWatcherManager(
57 const storage::FileSystemURL& url) = 0; 57 const storage::FileSystemURL& url) = 0;
58
59 // Called from FileSystemBackend::GetRedirectURLForContents. Please ensure
60 // that the returned URL is secure. The URL is to be opened in a browser tab,
61 // or referred from <img>, <video>, XmlHttpRequest, etc...
tzik 2014/09/04 11:22:05 What does "secure" mean in this context? For the t
hirono 2014/09/05 06:09:05 It means there is no problem if the URL is opened
tzik 2014/09/05 07:09:23 Ah, so the third sentence explains for what usage
hirono 2014/09/05 09:17:49 Done.
62 virtual void GetRedirectURLForContents(
63 const storage::FileSystemURL& url,
64 const storage::URLCallback& callback) = 0;
58 }; 65 };
59 66
60 } // namespace chromeos 67 } // namespace chromeos
61 68
62 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_ 69 #endif // CHROME_BROWSER_CHROMEOS_FILEAPI_FILE_SYSTEM_BACKEND_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698