OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2012 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 "LocalFileSystem.h" | 32 #include "LocalFileSystem.h" |
33 | 33 |
34 #include "CrossThreadTask.h" | |
35 #include "Document.h" | |
36 #include "ErrorCallback.h" | 34 #include "ErrorCallback.h" |
37 #include "FileSystemCallback.h" | 35 #include "FileSystemCallback.h" |
38 #include "FileSystemCallbacks.h" | 36 #include "FileSystemCallbacks.h" |
39 #include "FileSystemType.h" | 37 #include "FileSystemType.h" |
40 #include "WebFileSystemCallbacksImpl.h" | 38 #include "WebFileSystemCallbacksImpl.h" |
41 #include "WebFrameClient.h" | 39 #include "WebFrameClient.h" |
42 #include "WebFrameImpl.h" | 40 #include "WebFrameImpl.h" |
43 #include "WebPermissionClient.h" | 41 #include "WebPermissionClient.h" |
44 #include "WebViewImpl.h" | 42 #include "WebViewImpl.h" |
45 #include "WebWorkerBase.h" | 43 #include "WebWorkerBase.h" |
46 #include "WorkerContext.h" | 44 #include "WorkerContext.h" |
47 #include "WorkerFileSystemCallbacksBridge.h" | 45 #include "WorkerFileSystemCallbacksBridge.h" |
48 #include "WorkerThread.h" | 46 #include "WorkerThread.h" |
| 47 #include "core/dom/CrossThreadTask.h" |
| 48 #include "core/dom/Document.h" |
49 #include <public/WebFileError.h> | 49 #include <public/WebFileError.h> |
50 #include <public/WebFileSystem.h> | 50 #include <public/WebFileSystem.h> |
51 #include <public/WebFileSystemType.h> | 51 #include <public/WebFileSystemType.h> |
| 52 #include <wtf/text/WTFString.h> |
52 #include <wtf/Threading.h> | 53 #include <wtf/Threading.h> |
53 #include <wtf/text/WTFString.h> | |
54 | 54 |
55 using namespace WebKit; | 55 using namespace WebKit; |
56 | 56 |
57 namespace WebCore { | 57 namespace WebCore { |
58 | 58 |
59 LocalFileSystem& LocalFileSystem::localFileSystem() | 59 LocalFileSystem& LocalFileSystem::localFileSystem() |
60 { | 60 { |
61 AtomicallyInitializedStatic(LocalFileSystem*, localFileSystem = new LocalFil
eSystem("")); | 61 AtomicallyInitializedStatic(LocalFileSystem*, localFileSystem = new LocalFil
eSystem("")); |
62 return *localFileSystem; | 62 return *localFileSystem; |
63 } | 63 } |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 WebKit::WebViewImpl* webView = webFrame->viewImpl(); | 230 WebKit::WebViewImpl* webView = webFrame->viewImpl(); |
231 if (webView->permissionClient() && !webView->permissionClient()->allowFileSy
stem(webFrame)) { | 231 if (webView->permissionClient() && !webView->permissionClient()->allowFileSy
stem(webFrame)) { |
232 context->postTask(createCallbackTask(&deleteFileSystemNotAllowed, callba
cks)); | 232 context->postTask(createCallbackTask(&deleteFileSystemNotAllowed, callba
cks)); |
233 return; | 233 return; |
234 } | 234 } |
235 | 235 |
236 webFrame->client()->deleteFileSystem(webFrame, static_cast<WebFileSystemType
>(type), new WebFileSystemCallbacksImpl(callbacks)); | 236 webFrame->client()->deleteFileSystem(webFrame, static_cast<WebFileSystemType
>(type), new WebFileSystemCallbacksImpl(callbacks)); |
237 } | 237 } |
238 | 238 |
239 } // namespace WebCore | 239 } // namespace WebCore |
OLD | NEW |