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

Side by Side Diff: chrome/browser/chromeos/file_manager/fileapi_util.h

Issue 2297043002: Web expose FileSystemFileEntry, FileSystemDirectoryEntry and friends (Closed)
Patch Set: Rebased Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file provides File API related utilities. 5 // This file provides File API related utilities.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_
8 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ 8 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_
9 9
10 #include <memory> 10 #include <memory>
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 namespace ui { 30 namespace ui {
31 struct SelectedFileInfo; 31 struct SelectedFileInfo;
32 } 32 }
33 33
34 namespace file_manager { 34 namespace file_manager {
35 namespace util { 35 namespace util {
36 36
37 // Structure information necessary to create a EntryDefinition, and therefore 37 // Structure information necessary to create a EntryDefinition, and therefore
38 // an Entry object on the JavaScript side. 38 // an FileSystemEntry object on the JavaScript side.
39 struct FileDefinition { 39 struct FileDefinition {
40 base::FilePath virtual_path; 40 base::FilePath virtual_path;
41 base::FilePath absolute_path; 41 base::FilePath absolute_path;
42 bool is_directory; 42 bool is_directory;
43 }; 43 };
44 44
45 // Contains all information needed to create an Entry object in custom bindings. 45 // Contains all information needed to create an FileSystemEntry object in custom
46 // bindings.
46 struct EntryDefinition { 47 struct EntryDefinition {
47 EntryDefinition(); 48 EntryDefinition();
48 EntryDefinition(const EntryDefinition& other); 49 EntryDefinition(const EntryDefinition& other);
49 ~EntryDefinition(); 50 ~EntryDefinition();
50 51
51 std::string file_system_root_url; // Used to create DOMFileSystem. 52 std::string file_system_root_url; // Used to create FileSystem.
52 std::string file_system_name; // Value of DOMFileSystem.name. 53 std::string file_system_name; // Value of FileSystem.name.
53 base::FilePath full_path; // Value of Entry.fullPath. 54 base::FilePath full_path; // Value of FileSystemEntry.fullPath.
54 // Whether to create FileEntry or DirectoryEntry when the corresponding entry 55 // Whether to create FileSystemFileEntry or FileSystemDirectoryEntry when the
55 // is not found. 56 // corresponding entry is not found.
56 bool is_directory; 57 bool is_directory;
57 base::File::Error error; 58 base::File::Error error;
58 }; 59 };
59 60
60 typedef std::vector<FileDefinition> FileDefinitionList; 61 typedef std::vector<FileDefinition> FileDefinitionList;
61 typedef std::vector<EntryDefinition> EntryDefinitionList; 62 typedef std::vector<EntryDefinition> EntryDefinitionList;
62 typedef std::vector<ui::SelectedFileInfo> SelectedFileInfoList; 63 typedef std::vector<ui::SelectedFileInfo> SelectedFileInfoList;
63 typedef std::vector<content::FileChooserFileInfo> FileChooserFileInfoList; 64 typedef std::vector<content::FileChooserFileInfo> FileChooserFileInfoList;
64 65
65 // The callback used by ConvertFileDefinitionToEntryDefinition. Returns the 66 // The callback used by ConvertFileDefinitionToEntryDefinition. Returns the
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // external file system. 166 // external file system.
166 storage::FileSystemURL CreateIsolatedURLFromVirtualPath( 167 storage::FileSystemURL CreateIsolatedURLFromVirtualPath(
167 const storage::FileSystemContext& context, 168 const storage::FileSystemContext& context,
168 const GURL& origin, 169 const GURL& origin,
169 const base::FilePath& virtual_path); 170 const base::FilePath& virtual_path);
170 171
171 } // namespace util 172 } // namespace util
172 } // namespace file_manager 173 } // namespace file_manager
173 174
174 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_ 175 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILEAPI_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/media_galleries/media_galleries_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698