| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 // A common base class for DOMFileSystem and DOMFileSystemSync. | 60 // A common base class for DOMFileSystem and DOMFileSystemSync. |
| 61 class MODULES_EXPORT DOMFileSystemBase | 61 class MODULES_EXPORT DOMFileSystemBase |
| 62 : public GarbageCollectedFinalized<DOMFileSystemBase> { | 62 : public GarbageCollectedFinalized<DOMFileSystemBase> { |
| 63 public: | 63 public: |
| 64 enum SynchronousType { | 64 enum SynchronousType { |
| 65 Synchronous, | 65 Synchronous, |
| 66 Asynchronous, | 66 Asynchronous, |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // Path prefixes that are used in the filesystem URLs (that can be obtained by
toURL()). | 69 // Path prefixes that are used in the filesystem URLs (that can be obtained by |
| 70 // http://www.w3.org/TR/file-system-api/#widl-Entry-toURL | 70 // toURL()). http://www.w3.org/TR/file-system-api/#widl-Entry-toURL |
| 71 static const char persistentPathPrefix[]; | 71 static const char persistentPathPrefix[]; |
| 72 static const char temporaryPathPrefix[]; | 72 static const char temporaryPathPrefix[]; |
| 73 static const char isolatedPathPrefix[]; | 73 static const char isolatedPathPrefix[]; |
| 74 static const char externalPathPrefix[]; | 74 static const char externalPathPrefix[]; |
| 75 | 75 |
| 76 virtual ~DOMFileSystemBase(); | 76 virtual ~DOMFileSystemBase(); |
| 77 | 77 |
| 78 // These are called when a new callback is created and resolved in | 78 // These are called when a new callback is created and resolved in |
| 79 // FileSystem API, so that subclasses can track the number of pending | 79 // FileSystem API, so that subclasses can track the number of pending |
| 80 // callbacks if necessary. | 80 // callbacks if necessary. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 105 const EntryBase*, | 105 const EntryBase*, |
| 106 String path, | 106 String path, |
| 107 String& absolutePath); | 107 String& absolutePath); |
| 108 static bool pathPrefixToFileSystemType(const String& pathPrefix, | 108 static bool pathPrefixToFileSystemType(const String& pathPrefix, |
| 109 FileSystemType&); | 109 FileSystemType&); |
| 110 static File* createFile(const FileMetadata&, | 110 static File* createFile(const FileMetadata&, |
| 111 const KURL& fileSystemURL, | 111 const KURL& fileSystemURL, |
| 112 FileSystemType, | 112 FileSystemType, |
| 113 const String name); | 113 const String name); |
| 114 | 114 |
| 115 // Actual FileSystem API implementations. All the validity checks on virtual p
aths are done at this level. | 115 // Actual FileSystem API implementations. All the validity checks on virtual |
| 116 // paths are done at this level. |
| 116 void getMetadata(const EntryBase*, | 117 void getMetadata(const EntryBase*, |
| 117 MetadataCallback*, | 118 MetadataCallback*, |
| 118 ErrorCallbackBase*, | 119 ErrorCallbackBase*, |
| 119 SynchronousType = Asynchronous); | 120 SynchronousType = Asynchronous); |
| 120 void move(const EntryBase* source, | 121 void move(const EntryBase* source, |
| 121 EntryBase* parent, | 122 EntryBase* parent, |
| 122 const String& name, | 123 const String& name, |
| 123 EntryCallback*, | 124 EntryCallback*, |
| 124 ErrorCallbackBase*, | 125 ErrorCallbackBase*, |
| 125 SynchronousType = Asynchronous); | 126 SynchronousType = Asynchronous); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 }; | 177 }; |
| 177 | 178 |
| 178 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) { | 179 inline bool operator==(const DOMFileSystemBase& a, const DOMFileSystemBase& b) { |
| 179 return a.name() == b.name() && a.type() == b.type() && | 180 return a.name() == b.name() && a.type() == b.type() && |
| 180 a.rootURL() == b.rootURL(); | 181 a.rootURL() == b.rootURL(); |
| 181 } | 182 } |
| 182 | 183 |
| 183 } // namespace blink | 184 } // namespace blink |
| 184 | 185 |
| 185 #endif // DOMFileSystemBase_h | 186 #endif // DOMFileSystemBase_h |
| OLD | NEW |