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

Side by Side Diff: webkit/browser/fileapi/file_system_backend.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/files/file.h" 12 #include "base/files/file.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "webkit/browser/fileapi/file_permission_policy.h" 15 #include "webkit/browser/fileapi/file_permission_policy.h"
16 #include "webkit/browser/fileapi/open_file_system_mode.h" 16 #include "webkit/browser/fileapi/open_file_system_mode.h"
17 #include "webkit/browser/storage_browser_export.h" 17 #include "webkit/browser/storage_browser_export.h"
18 #include "webkit/common/fileapi/file_system_types.h" 18 #include "webkit/common/fileapi/file_system_types.h"
19 19
20 class GURL; 20 class GURL;
21 21
22 namespace storage { 22 namespace storage {
23 class FileStreamReader; 23 class FileStreamReader;
24 } 24 }
mtomasz 2014/09/04 06:18:51 nit: Not related to this patch, but these namespac
hirono 2014/09/04 07:15:38 Done.
25 25
26 namespace storage { 26 namespace storage {
27 27
28 class AsyncFileUtil; 28 class AsyncFileUtil;
29 class CopyOrMoveFileValidatorFactory; 29 class CopyOrMoveFileValidatorFactory;
30 class FileSystemURL; 30 class FileSystemURL;
31 class FileStreamWriter; 31 class FileStreamWriter;
32 class FileSystemContext; 32 class FileSystemContext;
33 class FileSystemFileUtil; 33 class FileSystemFileUtil;
34 class FileSystemOperation; 34 class FileSystemOperation;
35 class FileSystemQuotaUtil; 35 class FileSystemQuotaUtil;
36 class WatcherManager; 36 class WatcherManager;
37 37
38 // Callback to take GURL.
39 typedef base::Callback<void(const GURL& url)> URLCallback;
40
38 // An interface for defining a file system backend. 41 // An interface for defining a file system backend.
39 // 42 //
40 // NOTE: when you implement a new FileSystemBackend for your own 43 // NOTE: when you implement a new FileSystemBackend for your own
41 // FileSystem module, please contact to kinuko@chromium.org. 44 // FileSystem module, please contact to kinuko@chromium.org.
42 // 45 //
43 class STORAGE_EXPORT FileSystemBackend { 46 class STORAGE_EXPORT FileSystemBackend {
44 public: 47 public:
45 // Callback for InitializeFileSystem. 48 // Callback for InitializeFileSystem.
46 typedef base::Callback<void(const GURL& root_url, 49 typedef base::Callback<void(const GURL& root_url,
47 const std::string& name, 50 const std::string& name,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 virtual void GrantFileAccessToExtension( 153 virtual void GrantFileAccessToExtension(
151 const std::string& extension_id, 154 const std::string& extension_id,
152 const base::FilePath& virtual_path) = 0; 155 const base::FilePath& virtual_path) = 0;
153 // Revokes file access from extension identified with |extension_id|. 156 // Revokes file access from extension identified with |extension_id|.
154 virtual void RevokeAccessForExtension( 157 virtual void RevokeAccessForExtension(
155 const std::string& extension_id) = 0; 158 const std::string& extension_id) = 0;
156 // Gets virtual path by known filesystem path. Returns false when filesystem 159 // Gets virtual path by known filesystem path. Returns false when filesystem
157 // path is not exposed by this provider. 160 // path is not exposed by this provider.
158 virtual bool GetVirtualPath(const base::FilePath& file_system_path, 161 virtual bool GetVirtualPath(const base::FilePath& file_system_path,
159 base::FilePath* virtual_path) = 0; 162 base::FilePath* virtual_path) = 0;
163 // Gets a redirect URL for browser tab. e.g. Google Drive URL for hosted
164 // documents. Returns empty URL if the entry does not have the redirect URL.
165 virtual void GetRedirectURLForBrowserTab(
166 const storage::FileSystemURL& url,
167 const storage::URLCallback& callback) = 0;
160 }; 168 };
161 169
162 } // namespace storage 170 } // namespace storage
163 171
164 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_ 172 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698