OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 WebFileSystem* fileSystem() const; | 89 WebFileSystem* fileSystem() const; |
90 SecurityOrigin* getSecurityOrigin() const; | 90 SecurityOrigin* getSecurityOrigin() const; |
91 | 91 |
92 // The clonable flag is used in the structured clone algorithm to test | 92 // The clonable flag is used in the structured clone algorithm to test |
93 // whether the FileSystem API object is permitted to be cloned. It defaults | 93 // whether the FileSystem API object is permitted to be cloned. It defaults |
94 // to false, and must be explicitly set by internal code permit cloning. | 94 // to false, and must be explicitly set by internal code permit cloning. |
95 void makeClonable() { m_clonable = true; } | 95 void makeClonable() { m_clonable = true; } |
96 bool clonable() const { return m_clonable; } | 96 bool clonable() const { return m_clonable; } |
97 | 97 |
98 static bool isValidType(FileSystemType); | 98 static bool isValidType(FileSystemType); |
99 static bool crackFileSystemURL(const KURL&, FileSystemType&, String& filePat
h); | |
100 static KURL createFileSystemRootURL(const String& origin, FileSystemType); | 99 static KURL createFileSystemRootURL(const String& origin, FileSystemType); |
101 bool supportsToURL() const; | 100 bool supportsToURL() const; |
102 KURL createFileSystemURL(const EntryBase*) const; | 101 KURL createFileSystemURL(const EntryBase*) const; |
103 KURL createFileSystemURL(const String& fullPath) const; | 102 KURL createFileSystemURL(const String& fullPath) const; |
104 static bool pathToAbsolutePath(FileSystemType, const EntryBase*, String path
, String& absolutePath); | 103 static bool pathToAbsolutePath(FileSystemType, const EntryBase*, String path
, String& absolutePath); |
105 static bool pathPrefixToFileSystemType(const String& pathPrefix, FileSystemT
ype&); | 104 static bool pathPrefixToFileSystemType(const String& pathPrefix, FileSystemT
ype&); |
106 static File* createFile(const FileMetadata&, const KURL& fileSystemURL, File
SystemType, const String name); | 105 static File* createFile(const FileMetadata&, const KURL& fileSystemURL, File
SystemType, const String name); |
107 | 106 |
108 // Actual FileSystem API implementations. All the validity checks on virtual
paths are done at this level. | 107 // Actual FileSystem API implementations. All the validity checks on virtual
paths are done at this level. |
109 void getMetadata(const EntryBase*, MetadataCallback*, ErrorCallbackBase*, Sy
nchronousType = Asynchronous); | 108 void getMetadata(const EntryBase*, MetadataCallback*, ErrorCallbackBase*, Sy
nchronousType = Asynchronous); |
(...skipping 20 matching lines...) Expand all Loading... |
130 FileSystemType m_type; | 129 FileSystemType m_type; |
131 KURL m_filesystemRootURL; | 130 KURL m_filesystemRootURL; |
132 bool m_clonable; | 131 bool m_clonable; |
133 }; | 132 }; |
134 | 133 |
135 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) {
return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL
(); } | 134 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) {
return a.name() == b.name() && a.type() == b.type() && a.rootURL() == b.rootURL
(); } |
136 | 135 |
137 } // namespace blink | 136 } // namespace blink |
138 | 137 |
139 #endif // DOMFileSystemBase_h | 138 #endif // DOMFileSystemBase_h |
OLD | NEW |