| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "WorkerFileSystemClient.h" | 32 #include "WorkerFileSystemClient.h" |
| 33 | 33 |
| 34 #include "WebFileSystemCallbacksImpl.h" | |
| 35 #include "WebWorkerBase.h" | 34 #include "WebWorkerBase.h" |
| 36 #include "WorkerAllowMainThreadBridgeBase.h" | 35 #include "WorkerAllowMainThreadBridgeBase.h" |
| 37 #include "core/dom/ScriptExecutionContext.h" | 36 #include "core/dom/ScriptExecutionContext.h" |
| 38 #include "core/platform/AsyncFileSystemCallbacks.h" | 37 #include "core/platform/AsyncFileSystemCallbacks.h" |
| 39 #include "core/workers/WorkerGlobalScope.h" | 38 #include "core/workers/WorkerGlobalScope.h" |
| 40 #include "core/workers/WorkerThread.h" | 39 #include "core/workers/WorkerThread.h" |
| 41 #include "public/platform/Platform.h" | 40 #include "public/platform/Platform.h" |
| 42 #include "public/platform/WebFileError.h" | 41 #include "public/platform/WebFileError.h" |
| 43 #include "public/platform/WebFileSystem.h" | 42 #include "public/platform/WebFileSystem.h" |
| 44 #include "public/platform/WebFileSystemType.h" | 43 #include "public/platform/WebFileSystemType.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 bridge->cancel(); | 103 bridge->cancel(); |
| 105 return false; | 104 return false; |
| 106 } | 105 } |
| 107 | 106 |
| 108 return bridge->result(); | 107 return bridge->result(); |
| 109 } | 108 } |
| 110 | 109 |
| 111 void WorkerFileSystemClient::openFileSystem(ScriptExecutionContext* context, Web
Core::FileSystemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, long
long size, OpenFileSystemMode openMode) | 110 void WorkerFileSystemClient::openFileSystem(ScriptExecutionContext* context, Web
Core::FileSystemType type, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, long
long size, OpenFileSystemMode openMode) |
| 112 { | 111 { |
| 113 KURL storagePartition = KURL(KURL(), context->securityOrigin()->toString()); | 112 KURL storagePartition = KURL(KURL(), context->securityOrigin()->toString()); |
| 114 // FIXME: fix this callbacks raw pointer. | 113 WebKit::Platform::current()->fileSystem()->openFileSystem(storagePartition,
static_cast<WebFileSystemType>(type), openMode == CreateFileSystemIfNotPresent,
callbacks); |
| 115 WebKit::Platform::current()->fileSystem()->openFileSystem(storagePartition,
static_cast<WebFileSystemType>(type), openMode == CreateFileSystemIfNotPresent,
new WebKit::WebFileSystemCallbacksImpl(callbacks)); | |
| 116 } | 114 } |
| 117 | 115 |
| 118 void WorkerFileSystemClient::deleteFileSystem(WebCore::ScriptExecutionContext*,
WebCore::FileSystemType, PassOwnPtr<WebCore::AsyncFileSystemCallbacks>) | 116 void WorkerFileSystemClient::deleteFileSystem(WebCore::ScriptExecutionContext*,
WebCore::FileSystemType, PassOwnPtr<WebCore::AsyncFileSystemCallbacks>) |
| 119 { | 117 { |
| 120 ASSERT_NOT_REACHED(); | 118 ASSERT_NOT_REACHED(); |
| 121 } | 119 } |
| 122 | 120 |
| 123 WorkerFileSystemClient::WorkerFileSystemClient() | 121 WorkerFileSystemClient::WorkerFileSystemClient() |
| 124 { | 122 { |
| 125 } | 123 } |
| 126 | 124 |
| 127 } // namespace WebKit | 125 } // namespace WebKit |
| OLD | NEW |