Changeset 88844 in webkit
- Timestamp:
- Jun 14, 2011 1:01:19 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r88835 r88844 1 2011-06-14 Eric Uhrhane <ericu@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Clean up filesystem base path code. 6 https://bugs.webkit.org/show_bug.cgi?id=60218 7 8 Change a bunch of url-held-in-a-string parameters into real KURLS and 9 WebURLs. 10 11 No new tests--no change in functionality. 12 13 * fileapi/DOMFileSystem.cpp: 14 (WebCore::DOMFileSystem::createWriter): 15 (WebCore::DOMFileSystem::createFile): 16 * fileapi/DOMFileSystemBase.cpp: 17 (WebCore::DOMFileSystemBase::getMetadata): 18 (WebCore::DOMFileSystemBase::move): 19 (WebCore::DOMFileSystemBase::copy): 20 (WebCore::DOMFileSystemBase::remove): 21 (WebCore::DOMFileSystemBase::removeRecursively): 22 (WebCore::DOMFileSystemBase::getParent): 23 (WebCore::DOMFileSystemBase::getFile): 24 (WebCore::DOMFileSystemBase::getDirectory): 25 (WebCore::DOMFileSystemBase::readDirectory): 26 * fileapi/DOMFileSystemSync.cpp: 27 (WebCore::DOMFileSystemSync::createFile): 28 (WebCore::DOMFileSystemSync::createWriter): 29 * platform/AsyncFileSystem.cpp: 30 (WebCore::AsyncFileSystem::openFileSystem): 31 * platform/AsyncFileSystem.h: 32 (WebCore::AsyncFileSystem::AsyncFileSystem): 33 1 34 2011-06-14 James Robinson <jamesr@chromium.org> 2 35 -
trunk/Source/WebCore/fileapi/DOMFileSystem.cpp
r87095 r88844 106 106 ASSERT(fileEntry); 107 107 108 String platformPath = m_asyncFileSystem->virtualToPlatformPath(fileEntry->fullPath());109 110 108 RefPtr<FileWriter> fileWriter = FileWriter::create(scriptExecutionContext()); 111 109 RefPtr<FileWriterBaseCallback> conversionCallback = ConvertToFileWriterCallback::create(successCallback); 112 110 OwnPtr<FileWriterBaseCallbacks> callbacks = FileWriterBaseCallbacks::create(fileWriter, conversionCallback, errorCallback); 113 m_asyncFileSystem->createWriter(fileWriter.get(), platformPath, callbacks.release());111 m_asyncFileSystem->createWriter(fileWriter.get(), fileEntry->fullPath(), callbacks.release()); 114 112 } 115 113 … … 118 116 class GetPathCallback : public FileSystemCallbacksBase { 119 117 public: 120 static PassOwnPtr<GetPathCallback> create(PassRefPtr<DOMFileSystem> filesystem, const String& path, const String&name, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)118 static PassOwnPtr<GetPathCallback> create(PassRefPtr<DOMFileSystem> filesystem, const String& name, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) 121 119 { 122 return adoptPtr(new GetPathCallback(filesystem, path,name, successCallback, errorCallback));120 return adoptPtr(new GetPathCallback(filesystem, name, successCallback, errorCallback)); 123 121 } 124 122 125 123 virtual void didReadMetadata(const FileMetadata& metadata) 126 124 { 127 if (!metadata.platformPath.isEmpty()) 128 m_path = metadata.platformPath; 129 130 m_filesystem->scheduleCallback(m_successCallback.release(), File::createWithName(m_path, m_name)); 125 ASSERT(!metadata.platformPath.isEmpty()); 126 m_filesystem->scheduleCallback(m_successCallback.release(), File::createWithName(metadata.platformPath, m_name)); 131 127 } 132 128 133 129 private: 134 GetPathCallback(PassRefPtr<DOMFileSystem> filesystem, const String& path, const String& name,PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)130 GetPathCallback(PassRefPtr<DOMFileSystem> filesystem, const String& name, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) 135 131 : FileSystemCallbacksBase(errorCallback) 136 132 , m_filesystem(filesystem) 137 , m_path(path)138 133 , m_name(name) 139 134 , m_successCallback(successCallback) … … 142 137 143 138 RefPtr<DOMFileSystem> m_filesystem; 144 String m_path;145 139 String m_name; 146 140 RefPtr<FileCallback> m_successCallback; … … 151 145 void DOMFileSystem::createFile(const FileEntry* fileEntry, PassRefPtr<FileCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) 152 146 { 153 String platformPath = m_asyncFileSystem->virtualToPlatformPath(fileEntry->fullPath()); 154 155 m_asyncFileSystem->readMetadata(platformPath, GetPathCallback::create(this, platformPath, fileEntry->name(), successCallback, errorCallback)); 147 m_asyncFileSystem->readMetadata(fileEntry->fullPath(), GetPathCallback::create(this, fileEntry->name(), successCallback, errorCallback)); 156 148 } 157 149 -
trunk/Source/WebCore/fileapi/DOMFileSystemBase.cpp
r86291 r88844 106 106 bool DOMFileSystemBase::getMetadata(const EntryBase* entry, PassRefPtr<MetadataCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) 107 107 { 108 String platformPath = m_asyncFileSystem->virtualToPlatformPath(entry->fullPath()); 109 m_asyncFileSystem->readMetadata(platformPath, MetadataCallbacks::create(successCallback, errorCallback)); 108 m_asyncFileSystem->readMetadata(entry->fullPath(), MetadataCallbacks::create(successCallback, errorCallback)); 110 109 return true; 111 110 } … … 157 156 return false; 158 157 159 String sourcePlatformPath = m_asyncFileSystem->virtualToPlatformPath(source->fullPath()); 160 String destinationPlatformPath = parent->filesystem()->asyncFileSystem()->virtualToPlatformPath(destinationPath); 161 m_asyncFileSystem->move(sourcePlatformPath, destinationPlatformPath, EntryCallbacks::create(successCallback, errorCallback, this, destinationPath, source->isDirectory())); 158 m_asyncFileSystem->move(source->fullPath(), destinationPath, EntryCallbacks::create(successCallback, errorCallback, this, destinationPath, source->isDirectory())); 162 159 return true; 163 160 } … … 169 166 return false; 170 167 171 String sourcePlatformPath = m_asyncFileSystem->virtualToPlatformPath(source->fullPath()); 172 String destinationPlatformPath = parent->filesystem()->asyncFileSystem()->virtualToPlatformPath(destinationPath); 173 m_asyncFileSystem->copy(sourcePlatformPath, destinationPlatformPath, EntryCallbacks::create(successCallback, errorCallback, this, destinationPath, source->isDirectory())); 168 m_asyncFileSystem->copy(source->fullPath(), destinationPath, EntryCallbacks::create(successCallback, errorCallback, this, destinationPath, source->isDirectory())); 174 169 return true; 175 170 } … … 181 176 if (entry->fullPath() == String(DOMFilePath::root)) 182 177 return false; 183 String platformPath = m_asyncFileSystem->virtualToPlatformPath(entry->fullPath()); 184 m_asyncFileSystem->remove(platformPath, VoidCallbacks::create(successCallback, errorCallback)); 178 m_asyncFileSystem->remove(entry->fullPath(), VoidCallbacks::create(successCallback, errorCallback)); 185 179 return true; 186 180 } … … 192 186 if (entry->fullPath() == String(DOMFilePath::root)) 193 187 return false; 194 String platformPath = m_asyncFileSystem->virtualToPlatformPath(entry->fullPath()); 195 m_asyncFileSystem->removeRecursively(platformPath, VoidCallbacks::create(successCallback, errorCallback)); 188 m_asyncFileSystem->removeRecursively(entry->fullPath(), VoidCallbacks::create(successCallback, errorCallback)); 196 189 return true; 197 190 } … … 201 194 ASSERT(entry); 202 195 String path = DOMFilePath::getDirectory(entry->fullPath()); 203 String platformPath = m_asyncFileSystem->virtualToPlatformPath(path); 204 m_asyncFileSystem->directoryExists(p latformPath, EntryCallbacks::create(successCallback, errorCallback, this, path, true));205 return true; 206 } 207 208 bool DOMFileSystemBase::getFile(const EntryBase* base, const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)196 197 m_asyncFileSystem->directoryExists(path, EntryCallbacks::create(successCallback, errorCallback, this, path, true)); 198 return true; 199 } 200 201 bool DOMFileSystemBase::getFile(const EntryBase* entry, const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) 209 202 { 210 203 String absolutePath; 211 if (!pathToAbsolutePath(m_asyncFileSystem->type(), base, path, absolutePath)) 212 return false; 213 214 String platformPath = m_asyncFileSystem->virtualToPlatformPath(absolutePath); 204 if (!pathToAbsolutePath(m_asyncFileSystem->type(), entry, path, absolutePath)) 205 return false; 206 215 207 OwnPtr<EntryCallbacks> callbacks = EntryCallbacks::create(successCallback, errorCallback, this, absolutePath, false); 216 208 if (flags && flags->isCreate()) 217 m_asyncFileSystem->createFile( platformPath, flags->isExclusive(), callbacks.release());209 m_asyncFileSystem->createFile(absolutePath, flags->isExclusive(), callbacks.release()); 218 210 else 219 m_asyncFileSystem->fileExists( platformPath, callbacks.release());220 return true; 221 } 222 223 bool DOMFileSystemBase::getDirectory(const EntryBase* base, const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)211 m_asyncFileSystem->fileExists(absolutePath, callbacks.release()); 212 return true; 213 } 214 215 bool DOMFileSystemBase::getDirectory(const EntryBase* entry, const String& path, PassRefPtr<WebKitFlags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback) 224 216 { 225 217 String absolutePath; 226 if (!pathToAbsolutePath(m_asyncFileSystem->type(), base, path, absolutePath)) 227 return false; 228 229 String platformPath = m_asyncFileSystem->virtualToPlatformPath(absolutePath); 218 if (!pathToAbsolutePath(m_asyncFileSystem->type(), entry, path, absolutePath)) 219 return false; 220 230 221 OwnPtr<EntryCallbacks> callbacks = EntryCallbacks::create(successCallback, errorCallback, this, absolutePath, true); 231 222 if (flags && flags->isCreate()) 232 m_asyncFileSystem->createDirectory( platformPath, flags->isExclusive(), callbacks.release());223 m_asyncFileSystem->createDirectory(absolutePath, flags->isExclusive(), callbacks.release()); 233 224 else 234 m_asyncFileSystem->directoryExists( platformPath, callbacks.release());225 m_asyncFileSystem->directoryExists(absolutePath, callbacks.release()); 235 226 return true; 236 227 } … … 239 230 { 240 231 ASSERT(DOMFilePath::isAbsolute(path)); 241 String platformPath = m_asyncFileSystem->virtualToPlatformPath(path); 242 m_asyncFileSystem->readDirectory(platformPath, EntriesCallbacks::create(successCallback, errorCallback, reader, path)); 232 m_asyncFileSystem->readDirectory(path, EntriesCallbacks::create(successCallback, errorCallback, reader, path)); 243 233 return true; 244 234 } -
trunk/Source/WebCore/fileapi/DOMFileSystemSync.cpp
r87095 r88844 157 157 { 158 158 ec = 0; 159 String platformPath = m_asyncFileSystem->virtualToPlatformPath(fileEntry->fullPath());160 159 RefPtr<GetPathHelper::GetPathResult> result(GetPathHelper::GetPathResult::create()); 161 m_asyncFileSystem->readMetadata( platformPath, GetPathHelper::create(result));160 m_asyncFileSystem->readMetadata(fileEntry->fullPath(), GetPathHelper::create(result)); 162 161 if (!m_asyncFileSystem->waitForOperationToComplete()) { 163 162 ec = FileException::ABORT_ERR; … … 168 167 return 0; 169 168 } 170 if (!result->m_path.isEmpty()) 171 platformPath = result->m_path; 172 return File::createWithName(platformPath, fileEntry->name()); 169 ASSERT(!result->m_path.isEmpty()); 170 return File::createWithName(result->m_path, fileEntry->name()); 173 171 } 174 172 … … 244 242 ec = 0; 245 243 246 String platformPath = m_asyncFileSystem->virtualToPlatformPath(fileEntry->fullPath());247 244 248 245 RefPtr<FileWriterSync> fileWriter = FileWriterSync::create(); … … 251 248 252 249 OwnPtr<FileWriterBaseCallbacks> callbacks = FileWriterBaseCallbacks::create(fileWriter, successCallback, errorCallback); 253 m_asyncFileSystem->createWriter(fileWriter.get(), platformPath, callbacks.release());250 m_asyncFileSystem->createWriter(fileWriter.get(), fileEntry->fullPath(), callbacks.release()); 254 251 if (!m_asyncFileSystem->waitForOperationToComplete()) { 255 252 ec = FileException::ABORT_ERR; -
trunk/Source/WebCore/platform/AsyncFileSystem.cpp
r78362 r88844 53 53 } 54 54 55 // Default implementation.56 55 void AsyncFileSystem::openFileSystem(const String& basePath, const String& storageIdentifier, Type type, bool, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 57 56 { 58 String typeString = (type == Persistent) ? "Persistent" : "Temporary"; 59 60 String name = storageIdentifier; 61 name += ":"; 62 name += typeString; 63 64 String rootPath = basePath; 65 rootPath.append(PlatformFilePathSeparator); 66 rootPath += storageIdentifier; 67 rootPath.append(PlatformFilePathSeparator); 68 rootPath += typeString; 69 rootPath.append(PlatformFilePathSeparator); 70 71 callbacks->didOpenFileSystem(name, AsyncFileSystem::create(type, rootPath)); 57 notImplemented(); 58 callbacks->didFail(NOT_SUPPORTED_ERR); 72 59 } 73 60 #endif 74 75 // Default implementation.76 String AsyncFileSystem::virtualToPlatformPath(const String& path) const77 {78 ASSERT(!m_platformRootPath.isEmpty());79 String virtualPath = path;80 return m_platformRootPath + virtualPath.replace('/', PlatformFilePathSeparator);81 }82 61 83 62 } // namespace -
trunk/Source/WebCore/platform/AsyncFileSystem.h
r83972 r88844 34 34 #if ENABLE(FILE_SYSTEM) 35 35 36 #include "KURL.h" 36 37 #include "PlatformString.h" 37 38 #include "Timer.h" … … 67 68 68 69 // Creates and returns a new platform-specific AsyncFileSystem instance if the platform has its own implementation. 69 static PassOwnPtr<AsyncFileSystem> create(Type , const String& rootPath);70 static PassOwnPtr<AsyncFileSystem> create(Type); 70 71 71 72 // Opens a new file system. The create parameter specifies whether or not to create the path if it does not already exists. … … 128 129 virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0; 129 130 130 // Converts a given absolute virtual path to a platform path that starts with the platform root path of this file system.131 virtual String virtualToPlatformPath(const String& path) const;132 133 // Getter for this file system's root path.134 String root() const { return m_platformRootPath; }135 136 131 Type type() const { return m_type; } 137 132 138 133 protected: 139 AsyncFileSystem(Type type , const String& platformRootPath)134 AsyncFileSystem(Type type) 140 135 : m_type(type) 141 , m_platformRootPath(platformRootPath)142 136 { 143 137 } 144 138 145 139 Type m_type; 146 String m_platformRootPath;147 140 }; 148 141 -
trunk/Source/WebKit/chromium/ChangeLog
r88835 r88844 1 2011-06-14 Eric Uhrhane <ericu@chromium.org> 2 3 Reviewed by Darin Fisher. 4 5 Clean up filesystem base path code. 6 https://bugs.webkit.org/show_bug.cgi?id=60218 7 8 Change a bunch of url-held-in-a-string parameters into real KURLS and 9 WebURLs. Also add a #define to make it easier to stage this change, as 10 it involves both Chromium and WebKit changes that would ideally be 11 simultaneous. 12 13 No new tests--no change in functionality. 14 15 * public/WebFileSystem.h: 16 * public/WebFileSystemCallbacks.h: 17 * public/WebFrame.h: 18 * src/AsyncFileSystemChromium.cpp: 19 * src/AsyncFileSystemChromium.h: 20 * src/WebFileSystemCallbacksImpl.cpp: 21 * src/WebFileSystemCallbacksImpl.h: 22 * src/WebFrameImpl.cpp: 23 * src/WorkerAsyncFileSystemChromium.cpp: 24 * src/WorkerAsyncFileSystemChromium.h: 25 * src/WorkerAsyncFileWriterChromium.cpp: 26 * src/WorkerAsyncFileWriterChromium.h: 27 * src/WorkerFileSystemCallbacksBridge.cpp: 28 * src/WorkerFileSystemCallbacksBridge.h: 29 * src/WorkerFileWriterCallbacksBridge.cpp: 30 * src/WorkerFileWriterCallbacksBridge.h: 31 1 32 2011-06-14 James Robinson <jamesr@chromium.org> 2 33 -
trunk/Source/WebKit/chromium/public/WebFileSystem.h
r83972 r88844 33 33 34 34 #include "WebCommon.h" 35 #include "Web String.h"35 #include "WebURL.h" 36 36 37 37 namespace WebKit { … … 55 55 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 56 56 // WebFileSystemCallbacks::didFail() must be called otherwise. 57 virtual void move(const Web String& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }57 virtual void move(const WebURL& srcPath, const WebURL& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 58 58 59 59 // Copies a file or directory at |srcPath| to |destPath|. 60 60 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 61 61 // WebFileSystemCallbacks::didFail() must be called otherwise. 62 virtual void copy(const Web String& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }62 virtual void copy(const WebURL& srcPath, const WebURL& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 63 63 64 64 // Deletes a file or directory at a given |path|. … … 66 66 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 67 67 // WebFileSystemCallbacks::didFail() must be called otherwise. 68 virtual void remove(const Web String& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }68 virtual void remove(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 69 69 70 70 // Deletes a file or directory recursively at a given |path|. 71 71 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 72 72 // WebFileSystemCallbacks::didFail() must be called otherwise. 73 virtual void removeRecursively(const Web String& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }73 virtual void removeRecursively(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 74 74 75 75 // Retrieves the metadata information of the file or directory at the given |path|. 76 76 // WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully. 77 77 // WebFileSystemCallbacks::didFail() must be called otherwise. 78 virtual void readMetadata(const Web String& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }78 virtual void readMetadata(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 79 79 80 80 // Creates a file at given |path|. … … 86 86 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 87 87 // WebFileSystemCallbacks::didFail() must be called otherwise. 88 virtual void createFile(const Web String& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }88 virtual void createFile(const WebURL& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 89 89 90 90 // Creates a directory at a given |path|. … … 96 96 // the operation is completed successfully. 97 97 // WebFileSystemCallbacks::didFail() must be called otherwise. 98 virtual void createDirectory(const Web String& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }98 virtual void createDirectory(const WebURL& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 99 99 100 100 // Checks if a file exists at a given |path|. 101 101 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 102 102 // WebFileSystemCallbacks::didFail() must be called otherwise. 103 virtual void fileExists(const Web String& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }103 virtual void fileExists(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 104 104 105 105 // Checks if a directory exists at a given |path|. 106 106 // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully. 107 107 // WebFileSystemCallbacks::didFail() must be called otherwise. 108 virtual void directoryExists(const Web String& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }108 virtual void directoryExists(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 109 109 110 110 // Reads directory entries of a given directory at |path|. 111 111 // WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully. 112 112 // WebFileSystemCallbacks::didFail() must be called otherwise. 113 virtual void readDirectory(const Web String& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }113 virtual void readDirectory(const WebURL& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); } 114 114 115 115 // Creates a WebFileWriter that can be used to write to the given file. 116 116 // This is a fast, synchronous call, and should not stat the filesystem. 117 virtual WebFileWriter* createFileWriter(const Web String& path, WebFileWriterClient*) { WEBKIT_ASSERT_NOT_REACHED(); return 0; }117 virtual WebFileWriter* createFileWriter(const WebURL& path, WebFileWriterClient*) { WEBKIT_ASSERT_NOT_REACHED(); return 0; } 118 118 119 119 protected: -
trunk/Source/WebKit/chromium/public/WebFileSystemCallbacks.h
r65718 r88844 39 39 40 40 class WebString; 41 class WebURL; 41 42 struct WebFileInfo; 43 44 // Temporary hack to ease a 4-phase Chromium/WebKit commit. 45 #define WEBFILESYSTEMCALLBACKS_USE_URL_NOT_STRING 1 42 46 43 47 class WebFileSystemCallbacks { … … 58 62 59 63 // Callback for WebFrameClient::openFileSystem. Called with a name and 60 // root pathfor the FileSystem when the request is accepted.61 virtual void didOpenFileSystem(const WebString& name, const Web String& rootPath) = 0;64 // root URL for the FileSystem when the request is accepted. 65 virtual void didOpenFileSystem(const WebString& name, const WebURL& rootURL) = 0; 62 66 63 67 // Called with an error code when a requested operation hasn't been -
trunk/Source/WebKit/chromium/public/WebFrame.h
r88812 r88844 278 278 virtual v8::Handle<v8::Value> createFileSystem(WebFileSystem::Type, 279 279 const WebString& name, 280 const WebString& path) = 0;280 const WebString& rootURL) = 0; 281 281 // Creates an instance of file or directory entry object. 282 282 virtual v8::Handle<v8::Value> createFileEntry(WebFileSystem::Type, 283 283 const WebString& fileSystemName, 284 const WebString& fileSystem Path,284 const WebString& fileSystemRootURL, 285 285 const WebString& filePath, 286 286 bool isDirectory) = 0; -
trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.cpp
r78362 r88844 51 51 } 52 52 53 AsyncFileSystemChromium::AsyncFileSystemChromium(AsyncFileSystem::Type type, const String& rootPath)54 : AsyncFileSystem(type , rootPath)53 AsyncFileSystemChromium::AsyncFileSystemChromium(AsyncFileSystem::Type type, const KURL& rootURL) 54 : AsyncFileSystem(type) 55 55 , m_webFileSystem(WebKit::webKitClient()->fileSystem()) 56 , m_filesystemRootURL(rootURL) 56 57 { 57 58 ASSERT(m_webFileSystem); … … 64 65 void AsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 65 66 { 66 m_webFileSystem->move( sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));67 m_webFileSystem->move(virtualPathToFileSystemURL(sourcePath), virtualPathToFileSystemURL(destinationPath), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 67 68 } 68 69 69 70 void AsyncFileSystemChromium::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 70 71 { 71 m_webFileSystem->copy( sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));72 m_webFileSystem->copy(virtualPathToFileSystemURL(sourcePath), virtualPathToFileSystemURL(destinationPath), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 72 73 } 73 74 74 75 void AsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 75 76 { 76 m_webFileSystem->remove( path, new WebKit::WebFileSystemCallbacksImpl(callbacks));77 m_webFileSystem->remove(virtualPathToFileSystemURL(path), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 77 78 } 78 79 79 80 void AsyncFileSystemChromium::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 80 81 { 81 m_webFileSystem->removeRecursively( path, new WebKit::WebFileSystemCallbacksImpl(callbacks));82 m_webFileSystem->removeRecursively(virtualPathToFileSystemURL(path), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 82 83 } 83 84 84 85 void AsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 85 86 { 86 m_webFileSystem->readMetadata( path, new WebKit::WebFileSystemCallbacksImpl(callbacks));87 m_webFileSystem->readMetadata(virtualPathToFileSystemURL(path), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 87 88 } 88 89 89 90 void AsyncFileSystemChromium::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 90 91 { 91 m_webFileSystem->createFile( path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));92 m_webFileSystem->createFile(virtualPathToFileSystemURL(path), exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks)); 92 93 } 93 94 94 95 void AsyncFileSystemChromium::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 95 96 { 96 m_webFileSystem->createDirectory( path, exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks));97 m_webFileSystem->createDirectory(virtualPathToFileSystemURL(path), exclusive, new WebKit::WebFileSystemCallbacksImpl(callbacks)); 97 98 } 98 99 99 100 void AsyncFileSystemChromium::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 100 101 { 101 m_webFileSystem->fileExists( path, new WebKit::WebFileSystemCallbacksImpl(callbacks));102 m_webFileSystem->fileExists(virtualPathToFileSystemURL(path), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 102 103 } 103 104 104 105 void AsyncFileSystemChromium::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 105 106 { 106 m_webFileSystem->directoryExists( path, new WebKit::WebFileSystemCallbacksImpl(callbacks));107 m_webFileSystem->directoryExists(virtualPathToFileSystemURL(path), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 107 108 } 108 109 109 110 void AsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 110 111 { 111 m_webFileSystem->readDirectory( path, new WebKit::WebFileSystemCallbacksImpl(callbacks));112 m_webFileSystem->readDirectory(virtualPathToFileSystemURL(path), new WebKit::WebFileSystemCallbacksImpl(callbacks)); 112 113 } 113 114 114 115 class FileWriterHelperCallbacks : public WebKit::WebFileSystemCallbacks { 115 116 public: 116 FileWriterHelperCallbacks(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks)117 FileWriterHelperCallbacks(AsyncFileWriterClient* client, const KURL& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks) 117 118 : m_client(client) 118 119 , m_path(path) … … 146 147 delete this; 147 148 } 148 virtual void didOpenFileSystem(const WebKit::WebString& name, const WebKit::Web String& rootPath)149 virtual void didOpenFileSystem(const WebKit::WebString& name, const WebKit::WebURL& rootURL) 149 150 { 150 151 ASSERT_NOT_REACHED(); … … 161 162 private: 162 163 AsyncFileWriterClient* m_client; 163 Stringm_path;164 KURL m_path; 164 165 WebKit::WebFileSystem* m_webFileSystem; 165 166 OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks; … … 168 169 void AsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 169 170 { 170 m_webFileSystem->readMetadata(path, new FileWriterHelperCallbacks(client, path, m_webFileSystem, callbacks)); 171 KURL pathAsURL = virtualPathToFileSystemURL(path); 172 m_webFileSystem->readMetadata(pathAsURL, new FileWriterHelperCallbacks(client, pathAsURL, m_webFileSystem, callbacks)); 173 } 174 175 KURL AsyncFileSystemChromium::virtualPathToFileSystemURL(const String& virtualPath) const 176 { 177 ASSERT(!m_filesystemRootURL.isEmpty()); 178 KURL url = m_filesystemRootURL; 179 // Remove the extra leading slash. 180 url.setPath(url.path() + virtualPath.substring(1)); 181 return url; 171 182 } 172 183 -
trunk/Source/WebKit/chromium/src/AsyncFileSystemChromium.h
r78362 r88844 44 44 45 45 class AsyncFileSystemCallbacks; 46 class KURL; 46 47 47 48 class AsyncFileSystemChromium : public AsyncFileSystem { 48 49 public: 49 static PassOwnPtr<AsyncFileSystem> create(AsyncFileSystem::Type type, const String& rootPath)50 static PassOwnPtr<AsyncFileSystem> create(AsyncFileSystem::Type type, const KURL& rootURL) 50 51 { 51 return adoptPtr(new AsyncFileSystemChromium(type, root Path));52 return adoptPtr(new AsyncFileSystemChromium(type, rootURL)); 52 53 } 53 54 … … 67 68 68 69 private: 69 AsyncFileSystemChromium(AsyncFileSystem::Type, const String& rootPath);70 AsyncFileSystemChromium(AsyncFileSystem::Type, const KURL& rootURL); 70 71 WebKit::WebFileSystem* m_webFileSystem; 72 73 // Converts a given absolute virtual path to a full origin-qualified FileSystem URL. 74 KURL virtualPathToFileSystemURL(const String& virtualPath) const; 75 76 KURL m_filesystemRootURL; 71 77 }; 72 78 -
trunk/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
r87463 r88844 86 86 } 87 87 88 void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const Web String& path)88 void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebURL& rootURL) 89 89 { 90 90 // This object is intended to delete itself on exit. … … 93 93 #if ENABLE(WORKERS) 94 94 if (m_context && m_context->isWorkerContext()) { 95 m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, m_type, path, m_synchronous));95 m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, m_type, rootURL, m_synchronous)); 96 96 return; 97 97 } 98 98 #endif 99 m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(m_type, path));99 m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(m_type, rootURL)); 100 100 } 101 101 -
trunk/Source/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
r78362 r88844 49 49 struct WebFileSystemEntry; 50 50 class WebString; 51 class WebURL; 51 52 52 53 class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks { … … 58 59 virtual void didReadMetadata(const WebFileInfo& info); 59 60 virtual void didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore); 60 virtual void didOpenFileSystem(const WebString& name, const Web String& rootPath);61 virtual void didOpenFileSystem(const WebString& name, const WebURL& rootURL); 61 62 virtual void didFail(WebFileError error); 62 63 -
trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp
r88812 r88844 104 104 #include "IconURL.h" 105 105 #include "InspectorController.h" 106 #include "KURL.h" 106 107 #include "Page.h" 107 108 #include "PageOverlay.h" … … 861 862 const WebString& path) 862 863 { 863 return toV8(DOMFileSystem::create(frame()->document(), name, AsyncFileSystemChromium::create(static_cast<AsyncFileSystem::Type>(type), path)));864 return toV8(DOMFileSystem::create(frame()->document(), name, AsyncFileSystemChromium::create(static_cast<AsyncFileSystem::Type>(type), KURL(ParsedURLString, path.utf8().data())))); 864 865 } 865 866 … … 870 871 bool isDirectory) 871 872 { 872 RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->document(), fileSystemName, AsyncFileSystemChromium::create(static_cast<AsyncFileSystem::Type>(type), fileSystemPath));873 RefPtr<DOMFileSystemBase> fileSystem = DOMFileSystem::create(frame()->document(), fileSystemName, AsyncFileSystemChromium::create(static_cast<AsyncFileSystem::Type>(type), KURL(ParsedURLString, fileSystemPath.utf8().data()))); 873 874 if (isDirectory) 874 875 return toV8(DirectoryEntry::create(fileSystem, filePath)); -
trunk/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
r87463 r88844 57 57 static const char fileSystemOperationsMode[] = "fileSystemOperationsMode"; 58 58 59 WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, AsyncFileSystem::Type type, const String& rootPath, bool synchronous)60 : AsyncFileSystem(type , rootPath)59 WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, AsyncFileSystem::Type type, const WebKit::WebURL& rootURL, bool synchronous) 60 : AsyncFileSystem(type) 61 61 , m_scriptExecutionContext(context) 62 62 , m_webFileSystem(WebKit::webKitClient()->fileSystem()) 63 63 , m_workerContext(static_cast<WorkerContext*>(context)) 64 64 , m_synchronous(synchronous) 65 , m_filesystemRootURL(rootURL) 65 66 { 66 67 ASSERT(m_webFileSystem); … … 90 91 void WorkerAsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 91 92 { 92 createWorkerFileSystemCallbacksBridge(callbacks)->postMoveToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation);93 createWorkerFileSystemCallbacksBridge(callbacks)->postMoveToMainThread(m_webFileSystem, virtualPathToFileSystemURL(sourcePath), virtualPathToFileSystemURL(destinationPath), m_modeForCurrentOperation); 93 94 } 94 95 95 96 void WorkerAsyncFileSystemChromium::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 96 97 { 97 createWorkerFileSystemCallbacksBridge(callbacks)->postCopyToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation);98 createWorkerFileSystemCallbacksBridge(callbacks)->postCopyToMainThread(m_webFileSystem, virtualPathToFileSystemURL(sourcePath), virtualPathToFileSystemURL(destinationPath), m_modeForCurrentOperation); 98 99 } 99 100 100 101 void WorkerAsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 101 102 { 102 createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);103 createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), m_modeForCurrentOperation); 103 104 } 104 105 105 106 void WorkerAsyncFileSystemChromium::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 106 107 { 107 createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveRecursivelyToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);108 createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveRecursivelyToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), m_modeForCurrentOperation); 108 109 } 109 110 110 111 void WorkerAsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 111 112 { 112 createWorkerFileSystemCallbacksBridge(callbacks)->postReadMetadataToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);113 createWorkerFileSystemCallbacksBridge(callbacks)->postReadMetadataToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), m_modeForCurrentOperation); 113 114 } 114 115 115 116 void WorkerAsyncFileSystemChromium::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 116 117 { 117 createWorkerFileSystemCallbacksBridge(callbacks)->postCreateFileToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation);118 createWorkerFileSystemCallbacksBridge(callbacks)->postCreateFileToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), exclusive, m_modeForCurrentOperation); 118 119 } 119 120 120 121 void WorkerAsyncFileSystemChromium::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 121 122 { 122 createWorkerFileSystemCallbacksBridge(callbacks)->postCreateDirectoryToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation);123 createWorkerFileSystemCallbacksBridge(callbacks)->postCreateDirectoryToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), exclusive, m_modeForCurrentOperation); 123 124 } 124 125 125 126 void WorkerAsyncFileSystemChromium::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 126 127 { 127 createWorkerFileSystemCallbacksBridge(callbacks)->postFileExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);128 createWorkerFileSystemCallbacksBridge(callbacks)->postFileExistsToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), m_modeForCurrentOperation); 128 129 } 129 130 130 131 void WorkerAsyncFileSystemChromium::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 131 132 { 132 createWorkerFileSystemCallbacksBridge(callbacks)->postDirectoryExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);133 createWorkerFileSystemCallbacksBridge(callbacks)->postDirectoryExistsToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), m_modeForCurrentOperation); 133 134 } 134 135 135 136 void WorkerAsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 136 137 { 137 createWorkerFileSystemCallbacksBridge(callbacks)->postReadDirectoryToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);138 createWorkerFileSystemCallbacksBridge(callbacks)->postReadDirectoryToMainThread(m_webFileSystem, virtualPathToFileSystemURL(path), m_modeForCurrentOperation); 138 139 } 139 140 140 141 class WorkerFileWriterHelperCallbacks : public AsyncFileSystemCallbacks { 141 142 public: 142 static PassOwnPtr<WorkerFileWriterHelperCallbacks> create(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerContext* workerContext)143 static PassOwnPtr<WorkerFileWriterHelperCallbacks> create(AsyncFileWriterClient* client, const WebURL& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerContext* workerContext) 143 144 { 144 145 return adoptPtr(new WorkerFileWriterHelperCallbacks(client, path, webFileSystem, callbacks, workerContext)); … … 189 190 190 191 private: 191 WorkerFileWriterHelperCallbacks(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerContext* workerContext)192 WorkerFileWriterHelperCallbacks(AsyncFileWriterClient* client, const WebURL& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks, WorkerContext* workerContext) 192 193 : m_client(client) 193 194 , m_path(path) … … 199 200 200 201 AsyncFileWriterClient* m_client; 201 Stringm_path;202 WebURL m_path; 202 203 WebKit::WebFileSystem* m_webFileSystem; 203 204 OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks; … … 207 208 void WorkerAsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 208 209 { 209 createWorkerFileSystemCallbacksBridge(WorkerFileWriterHelperCallbacks::create(client, path, m_webFileSystem, callbacks, m_workerContext))->postReadMetadataToMainThread(m_webFileSystem, path, m_modeForCurrentOperation); 210 KURL pathAsURL = virtualPathToFileSystemURL(path); 211 createWorkerFileSystemCallbacksBridge(WorkerFileWriterHelperCallbacks::create(client, pathAsURL, m_webFileSystem, callbacks, m_workerContext))->postReadMetadataToMainThread(m_webFileSystem, pathAsURL, m_modeForCurrentOperation); 210 212 } 211 213 … … 221 223 } 222 224 225 KURL WorkerAsyncFileSystemChromium::virtualPathToFileSystemURL(const String& virtualPath) const 226 { 227 ASSERT(!m_filesystemRootURL.isEmpty()); 228 KURL url = m_filesystemRootURL; 229 // Remove the extra leading slash. 230 url.setPath(url.path() + virtualPath.substring(1)); 231 return url; 232 } 233 223 234 } // namespace WebCore 224 235 -
trunk/Source/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
r87463 r88844 41 41 namespace WebKit { 42 42 class WebFileSystem; 43 class WebURL; 43 44 class WebWorkerBase; 44 45 class WorkerFileSystemCallbacksBridge; … … 53 54 class WorkerAsyncFileSystemChromium : public AsyncFileSystem { 54 55 public: 55 static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, AsyncFileSystem::Type type, const String& rootPath, bool synchronous)56 static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, AsyncFileSystem::Type type, const WebKit::WebURL& rootURL, bool synchronous) 56 57 { 57 return adoptPtr(new WorkerAsyncFileSystemChromium(context, type, root Path, synchronous));58 return adoptPtr(new WorkerAsyncFileSystemChromium(context, type, rootURL, synchronous)); 58 59 } 59 60 … … 76 77 77 78 private: 78 WorkerAsyncFileSystemChromium(ScriptExecutionContext*, AsyncFileSystem::Type, const String& rootPath, bool synchronous);79 WorkerAsyncFileSystemChromium(ScriptExecutionContext*, AsyncFileSystem::Type, const WebKit::WebURL& rootURL, bool synchronous); 79 80 80 81 PassRefPtr<WebKit::WorkerFileSystemCallbacksBridge> createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks>); 82 83 // Converts a given absolute virtual path to a full origin-qualified FileSystem URL. 84 KURL virtualPathToFileSystemURL(const String& virtualPath) const; 81 85 82 86 ScriptExecutionContext* m_scriptExecutionContext; … … 87 91 String m_modeForCurrentOperation; 88 92 bool m_synchronous; 93 KURL m_filesystemRootURL; 89 94 }; 90 95 -
trunk/Source/WebKit/chromium/src/WorkerAsyncFileWriterChromium.cpp
r87463 r88844 51 51 namespace WebCore { 52 52 53 WorkerAsyncFileWriterChromium::WorkerAsyncFileWriterChromium(WebFileSystem* webFileSystem, const String& path, WorkerContext* workerContext, AsyncFileWriterClient* client, WriterType type)53 WorkerAsyncFileWriterChromium::WorkerAsyncFileWriterChromium(WebFileSystem* webFileSystem, const WebURL& path, WorkerContext* workerContext, AsyncFileWriterClient* client, WriterType type) 54 54 : m_type(type) 55 55 { -
trunk/Source/WebKit/chromium/src/WorkerAsyncFileWriterChromium.h
r87463 r88844 40 40 class WebFileSystem; 41 41 class WebFileWriter; 42 class WebURL; 42 43 class WorkerFileWriterCallbacksBridge; 43 44 } … … 62 63 }; 63 64 64 static PassOwnPtr<WorkerAsyncFileWriterChromium> create(WebKit::WebFileSystem* webFileSystem, const String& path, WorkerContext* workerContext, AsyncFileWriterClient* client, WriterType type)65 static PassOwnPtr<WorkerAsyncFileWriterChromium> create(WebKit::WebFileSystem* webFileSystem, const WebKit::WebURL& path, WorkerContext* workerContext, AsyncFileWriterClient* client, WriterType type) 65 66 { 66 67 return adoptPtr(new WorkerAsyncFileWriterChromium(webFileSystem, path, workerContext, client, type)); … … 77 78 private: 78 79 79 WorkerAsyncFileWriterChromium(WebKit::WebFileSystem*, const String& path, WorkerContext*, AsyncFileWriterClient*, WriterType);80 WorkerAsyncFileWriterChromium(WebKit::WebFileSystem*, const WebKit::WebURL& path, WorkerContext*, AsyncFileWriterClient*, WriterType); 80 81 RefPtr<WebKit::WorkerFileWriterCallbacksBridge> m_bridge; 81 82 WriterType m_type; -
trunk/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
r87463 r88844 35 35 36 36 #include "CrossThreadTask.h" 37 #include "KURL.h" 37 38 #include "WebCommonWorkerClient.h" 38 39 #include "WebFileInfo.h" … … 40 41 #include "WebFileSystemEntry.h" 41 42 #include "WebString.h" 43 #include "WebURL.h" 42 44 #include "WebWorkerBase.h" 43 45 #include "WorkerContext.h" … … 98 100 } 99 101 100 virtual void didOpenFileSystem(const WebString& name, const Web String& path)101 { 102 m_bridge->didOpenFileSystemOnMainThread(name, path, m_mode);102 virtual void didOpenFileSystem(const WebString& name, const WebURL& rootURL) 103 { 104 m_bridge->didOpenFileSystemOnMainThread(name, rootURL, m_mode); 103 105 delete this; 104 106 } … … 162 164 } 163 165 164 void WorkerFileSystemCallbacksBridge::postMoveToMainThread(WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, const String& mode)166 void WorkerFileSystemCallbacksBridge::postMoveToMainThread(WebFileSystem* fileSystem, const KURL& sourcePath, const KURL& destinationPath, const String& mode) 165 167 { 166 168 dispatchTaskToMainThread( … … 170 172 } 171 173 172 void WorkerFileSystemCallbacksBridge::postCopyToMainThread(WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, const String& mode)174 void WorkerFileSystemCallbacksBridge::postCopyToMainThread(WebFileSystem* fileSystem, const KURL& sourcePath, const KURL& destinationPath, const String& mode) 173 175 { 174 176 dispatchTaskToMainThread( … … 178 180 } 179 181 180 void WorkerFileSystemCallbacksBridge::postRemoveToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)182 void WorkerFileSystemCallbacksBridge::postRemoveToMainThread(WebFileSystem* fileSystem, const KURL& path, const String& mode) 181 183 { 182 184 ASSERT(fileSystem); … … 187 189 } 188 190 189 void WorkerFileSystemCallbacksBridge::postRemoveRecursivelyToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)191 void WorkerFileSystemCallbacksBridge::postRemoveRecursivelyToMainThread(WebFileSystem* fileSystem, const KURL& path, const String& mode) 190 192 { 191 193 ASSERT(fileSystem); … … 196 198 } 197 199 198 void WorkerFileSystemCallbacksBridge::postReadMetadataToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)200 void WorkerFileSystemCallbacksBridge::postReadMetadataToMainThread(WebFileSystem* fileSystem, const KURL& path, const String& mode) 199 201 { 200 202 ASSERT(fileSystem); … … 205 207 } 206 208 207 void WorkerFileSystemCallbacksBridge::postCreateFileToMainThread(WebFileSystem* fileSystem, const String& path, bool exclusive, const String& mode)209 void WorkerFileSystemCallbacksBridge::postCreateFileToMainThread(WebFileSystem* fileSystem, const KURL& path, bool exclusive, const String& mode) 208 210 { 209 211 dispatchTaskToMainThread( … … 213 215 } 214 216 215 void WorkerFileSystemCallbacksBridge::postCreateDirectoryToMainThread(WebFileSystem* fileSystem, const String& path, bool exclusive, const String& mode)217 void WorkerFileSystemCallbacksBridge::postCreateDirectoryToMainThread(WebFileSystem* fileSystem, const KURL& path, bool exclusive, const String& mode) 216 218 { 217 219 ASSERT(fileSystem); … … 222 224 } 223 225 224 void WorkerFileSystemCallbacksBridge::postFileExistsToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)226 void WorkerFileSystemCallbacksBridge::postFileExistsToMainThread(WebFileSystem* fileSystem, const KURL& path, const String& mode) 225 227 { 226 228 ASSERT(fileSystem); … … 231 233 } 232 234 233 void WorkerFileSystemCallbacksBridge::postDirectoryExistsToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)235 void WorkerFileSystemCallbacksBridge::postDirectoryExistsToMainThread(WebFileSystem* fileSystem, const KURL& path, const String& mode) 234 236 { 235 237 ASSERT(fileSystem); … … 240 242 } 241 243 242 void WorkerFileSystemCallbacksBridge::postReadDirectoryToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)244 void WorkerFileSystemCallbacksBridge::postReadDirectoryToMainThread(WebFileSystem* fileSystem, const KURL& path, const String& mode) 243 245 { 244 246 ASSERT(fileSystem); … … 258 260 } 259 261 260 void WorkerFileSystemCallbacksBridge::moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode)262 void WorkerFileSystemCallbacksBridge::moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& sourcePath, const KURL& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 261 263 { 262 264 fileSystem->move(sourcePath, destinationPath, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 263 265 } 264 266 265 void WorkerFileSystemCallbacksBridge::copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode)267 void WorkerFileSystemCallbacksBridge::copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& sourcePath, const KURL& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 266 268 { 267 269 fileSystem->copy(sourcePath, destinationPath, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 268 270 } 269 271 270 void WorkerFileSystemCallbacksBridge::removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)272 void WorkerFileSystemCallbacksBridge::removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 271 273 { 272 274 fileSystem->remove(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 273 275 } 274 276 275 void WorkerFileSystemCallbacksBridge::removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)277 void WorkerFileSystemCallbacksBridge::removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 276 278 { 277 279 fileSystem->removeRecursively(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 278 280 } 279 281 280 void WorkerFileSystemCallbacksBridge::readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)282 void WorkerFileSystemCallbacksBridge::readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 281 283 { 282 284 fileSystem->readMetadata(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 283 285 } 284 286 285 void WorkerFileSystemCallbacksBridge::createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode)287 void WorkerFileSystemCallbacksBridge::createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 286 288 { 287 289 fileSystem->createFile(path, exclusive, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 288 290 } 289 291 290 void WorkerFileSystemCallbacksBridge::createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode)292 void WorkerFileSystemCallbacksBridge::createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 291 293 { 292 294 fileSystem->createDirectory(path, exclusive, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 293 295 } 294 296 295 void WorkerFileSystemCallbacksBridge::fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)297 void WorkerFileSystemCallbacksBridge::fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 296 298 { 297 299 fileSystem->fileExists(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 298 300 } 299 301 300 void WorkerFileSystemCallbacksBridge::directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)302 void WorkerFileSystemCallbacksBridge::directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 301 303 { 302 304 fileSystem->directoryExists(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); 303 305 } 304 306 305 void WorkerFileSystemCallbacksBridge::readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)307 void WorkerFileSystemCallbacksBridge::readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const KURL& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode) 306 308 { 307 309 fileSystem->readDirectory(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode)); … … 313 315 } 314 316 315 void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode)317 void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnMainThread(const String& name, const KURL& rootURL, const String& mode) 316 318 { 317 319 mayPostTaskToWorker(createCallbackTask(&didOpenFileSystemOnWorkerThread, 318 AllowCrossThreadAccess(this), name, root Path), mode);320 AllowCrossThreadAccess(this), name, rootURL), mode); 319 321 } 320 322 … … 355 357 } 356 358 357 void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const String& name, const String& rootPath)358 { 359 bridge->m_callbacksOnWorkerThread->didOpenFileSystem(name, root Path);359 void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const String& name, const KURL& rootURL) 360 { 361 bridge->m_callbacksOnWorkerThread->didOpenFileSystem(name, rootURL); 360 362 } 361 363 -
trunk/Source/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h
r87463 r88844 86 86 // Methods that create an instance and post an initial request task to the main thread. They must be called on the worker thread. 87 87 void postOpenFileSystemToMainThread(WebCommonWorkerClient*, WebFileSystem::Type, long long size, bool create, const String& mode); 88 void postMoveToMainThread(WebFileSystem*, const String& srcPath, const String& destPath, const String& mode);89 void postCopyToMainThread(WebFileSystem*, const String& srcPath, const String& destPath, const String& mode);90 void postRemoveToMainThread(WebFileSystem*, const String& path, const String& mode);91 void postRemoveRecursivelyToMainThread(WebFileSystem*, const String& path, const String& mode);92 void postReadMetadataToMainThread(WebFileSystem*, const String& path, const String& mode);93 void postCreateFileToMainThread(WebFileSystem*, const String& path, bool exclusive, const String& mode);94 void postCreateDirectoryToMainThread(WebFileSystem*, const String& path, bool exclusive, const String& mode);95 void postFileExistsToMainThread(WebFileSystem*, const String& path, const String& mode);96 void postDirectoryExistsToMainThread(WebFileSystem*, const String& path, const String& mode);97 void postReadDirectoryToMainThread(WebFileSystem*, const String& path, const String& mode);88 void postMoveToMainThread(WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, const String& mode); 89 void postCopyToMainThread(WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, const String& mode); 90 void postRemoveToMainThread(WebFileSystem*, const WebCore::KURL& path, const String& mode); 91 void postRemoveRecursivelyToMainThread(WebFileSystem*, const WebCore::KURL& path, const String& mode); 92 void postReadMetadataToMainThread(WebFileSystem*, const WebCore::KURL& path, const String& mode); 93 void postCreateFileToMainThread(WebFileSystem*, const WebCore::KURL& path, bool exclusive, const String& mode); 94 void postCreateDirectoryToMainThread(WebFileSystem*, const WebCore::KURL& path, bool exclusive, const String& mode); 95 void postFileExistsToMainThread(WebFileSystem*, const WebCore::KURL& path, const String& mode); 96 void postDirectoryExistsToMainThread(WebFileSystem*, const WebCore::KURL& path, const String& mode); 97 void postReadDirectoryToMainThread(WebFileSystem*, const WebCore::KURL& path, const String& mode); 98 98 99 99 // Callback methods that are called on the main thread. 100 100 void didFailOnMainThread(WebFileError, const String& mode); 101 void didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode);101 void didOpenFileSystemOnMainThread(const String& name, const WebCore::KURL& rootURL, const String& mode); 102 102 void didSucceedOnMainThread(const String& mode); 103 103 void didReadMetadataOnMainThread(const WebFileInfo&, const String& mode); … … 109 109 // Methods that are to be called on the main thread. 110 110 static void openFileSystemOnMainThread(WebCore::ScriptExecutionContext*, WebCommonWorkerClient*, WebFileSystem::Type, long long size, bool create, WorkerFileSystemCallbacksBridge*, const String& mode); 111 static void moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& srcPath, const String& destPath, WorkerFileSystemCallbacksBridge*, const String& mode);112 static void copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& srcPath, const String& destPath, WorkerFileSystemCallbacksBridge*, const String& mode);113 static void removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);114 static void removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);115 static void readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);116 static void createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode);117 static void createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode);118 static void fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);119 static void directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);120 static void readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);111 static void moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, WorkerFileSystemCallbacksBridge*, const String& mode); 112 static void copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& srcPath, const WebCore::KURL& destPath, WorkerFileSystemCallbacksBridge*, const String& mode); 113 static void removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, WorkerFileSystemCallbacksBridge*, const String& mode); 114 static void removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, WorkerFileSystemCallbacksBridge*, const String& mode); 115 static void readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, WorkerFileSystemCallbacksBridge*, const String& mode); 116 static void createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode); 117 static void createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode); 118 static void fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, WorkerFileSystemCallbacksBridge*, const String& mode); 119 static void directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, WorkerFileSystemCallbacksBridge*, const String& mode); 120 static void readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const WebCore::KURL& path, WorkerFileSystemCallbacksBridge*, const String& mode); 121 121 122 122 friend class MainThreadFileSystemCallbacks; … … 124 124 // Methods that dispatch WebFileSystemCallbacks on the worker threads. 125 125 static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, WebFileError); 126 static void didOpenFileSystemOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const String& name, const String& rootPath);126 static void didOpenFileSystemOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const String& name, const WebCore::KURL& rootPath); 127 127 static void didSucceedOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*); 128 128 static void didReadMetadataOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const WebFileInfo&); -
trunk/Source/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.cpp
r87463 r88844 102 102 } 103 103 104 void WorkerFileWriterCallbacksBridge::initOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, const String& path)104 void WorkerFileWriterCallbacksBridge::initOnMainThread(ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge> bridge, const KURL& path) 105 105 { 106 106 ASSERT(!bridge->m_writer); … … 131 131 static const char fileWriterOperationsMode[] = "fileWriterOperationsMode"; 132 132 133 WorkerFileWriterCallbacksBridge::WorkerFileWriterCallbacksBridge(const String& path, WorkerLoaderProxy* proxy, ScriptExecutionContext* scriptExecutionContext, AsyncFileWriterClient* client)133 WorkerFileWriterCallbacksBridge::WorkerFileWriterCallbacksBridge(const KURL& path, WorkerLoaderProxy* proxy, ScriptExecutionContext* scriptExecutionContext, AsyncFileWriterClient* client) 134 134 : WorkerContext::Observer(static_cast<WorkerContext*>(scriptExecutionContext)) 135 135 , m_proxy(proxy) … … 145 145 } 146 146 147 void WorkerFileWriterCallbacksBridge::postInitToMainThread(const String& path)147 void WorkerFileWriterCallbacksBridge::postInitToMainThread(const KURL& path) 148 148 { 149 149 dispatchTaskToMainThread( -
trunk/Source/WebKit/chromium/src/WorkerFileWriterCallbacksBridge.h
r87463 r88844 34 34 #if ENABLE(FILE_SYSTEM) && ENABLE(WORKERS) 35 35 36 #include "KURL.h" 36 37 #include "WebFileError.h" 37 38 #include "WebFileWriterClient.h" … … 57 58 class WebFileWriter; 58 59 class WebFileWriterClient; 60 class WebURL; 59 61 class WebWorkerBase; 60 62 … … 87 89 virtual void notifyStop(); 88 90 89 static PassRefPtr<WorkerFileWriterCallbacksBridge> create(const String& path, WebCore::WorkerLoaderProxy* proxy, WebCore::ScriptExecutionContext* workerContext, WebCore::AsyncFileWriterClient* client)91 static PassRefPtr<WorkerFileWriterCallbacksBridge> create(const WebCore::KURL& path, WebCore::WorkerLoaderProxy* proxy, WebCore::ScriptExecutionContext* workerContext, WebCore::AsyncFileWriterClient* client) 90 92 { 91 93 return adoptRef(new WorkerFileWriterCallbacksBridge(path, proxy, workerContext, client)); … … 111 113 112 114 private: 113 WorkerFileWriterCallbacksBridge(const String& path, WebCore::WorkerLoaderProxy*, WebCore::ScriptExecutionContext*, WebCore::AsyncFileWriterClient*);115 WorkerFileWriterCallbacksBridge(const WebCore::KURL& path, WebCore::WorkerLoaderProxy*, WebCore::ScriptExecutionContext*, WebCore::AsyncFileWriterClient*); 114 116 115 void postInitToMainThread(const String& path);117 void postInitToMainThread(const WebCore::KURL& path); 116 118 117 119 // Methods that are to be called on the main thread. … … 119 121 static void truncateOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, long long length); 120 122 static void abortOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>); 121 static void initOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, const String& path);123 static void initOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>, const WebCore::KURL& path); 122 124 static void shutdownOnMainThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileWriterCallbacksBridge>); 123 125
Note: See TracChangeset
for help on using the changeset viewer.