OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "ScriptExecutionContext.h" | 50 #include "ScriptExecutionContext.h" |
51 #include "Worker.h" | 51 #include "Worker.h" |
52 #include "WorkerContext.h" | 52 #include "WorkerContext.h" |
53 #include "WorkerContextExecutionProxy.h" | 53 #include "WorkerContextExecutionProxy.h" |
54 #include "WorkerScriptController.h" | 54 #include "WorkerScriptController.h" |
55 #include "WorkerMessagingProxy.h" | 55 #include "WorkerMessagingProxy.h" |
56 #include <wtf/Threading.h> | 56 #include <wtf/Threading.h> |
57 | 57 |
58 #include "FrameLoaderClientImpl.h" | 58 #include "FrameLoaderClientImpl.h" |
59 #include "PlatformMessagePortChannel.h" | 59 #include "PlatformMessagePortChannel.h" |
| 60 #include "WebFileSystemCallbacks.h" |
60 #include "WebFrameClient.h" | 61 #include "WebFrameClient.h" |
61 #include "WebFrameImpl.h" | 62 #include "WebFrameImpl.h" |
62 #include "WebKit.h" | 63 #include "WebKit.h" |
63 #include "platform/WebKitPlatformSupport.h" | 64 #include "platform/WebKitPlatformSupport.h" |
64 #include "WebMessagePortChannel.h" | 65 #include "WebMessagePortChannel.h" |
65 #include "WebPermissionClient.h" | 66 #include "WebPermissionClient.h" |
66 #include "platform/WebString.h" | 67 #include "platform/WebString.h" |
67 #include "platform/WebURL.h" | 68 #include "platform/WebURL.h" |
68 #include "WebViewImpl.h" | 69 #include "WebViewImpl.h" |
69 | 70 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 return false; | 204 return false; |
204 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); | 205 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); |
205 if (!webView) | 206 if (!webView) |
206 return false; | 207 return false; |
207 return !webView->permissionClient() || webView->permissionClient()->allowFil
eSystem(m_webFrame); | 208 return !webView->permissionClient() || webView->permissionClient()->allowFil
eSystem(m_webFrame); |
208 } | 209 } |
209 | 210 |
210 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz
e, bool create, | 211 void WebWorkerClientImpl::openFileSystem(WebFileSystem::Type type, long long siz
e, bool create, |
211 WebFileSystemCallbacks* callbacks) | 212 WebFileSystemCallbacks* callbacks) |
212 { | 213 { |
213 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callba
cks); | 214 if (!m_webFrame->client()) { |
| 215 callbacks->didFail(WebFileErrorAbort); |
| 216 return; |
| 217 } |
| 218 m_webFrame->client()->openFileSystem(m_webFrame, type, size, create, callbac
ks); |
214 } | 219 } |
215 | 220 |
216 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const
WebString& displayName, unsigned long estimatedSize) | 221 bool WebWorkerClientImpl::allowDatabase(WebFrame*, const WebString& name, const
WebString& displayName, unsigned long estimatedSize) |
217 { | 222 { |
218 if (m_proxy->askedToTerminate()) | 223 if (m_proxy->askedToTerminate()) |
219 return false; | 224 return false; |
220 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); | 225 WebKit::WebViewImpl* webView = m_webFrame->viewImpl(); |
221 if (!webView) | 226 if (!webView) |
222 return false; | 227 return false; |
223 return !webView->permissionClient() || webView->permissionClient()->allowDat
abase(m_webFrame, name, displayName, estimatedSize); | 228 return !webView->permissionClient() || webView->permissionClient()->allowDat
abase(m_webFrame, name, displayName, estimatedSize); |
(...skipping 23 matching lines...) Expand all Loading... |
247 { | 252 { |
248 } | 253 } |
249 | 254 |
250 WebWorkerClientImpl::~WebWorkerClientImpl() | 255 WebWorkerClientImpl::~WebWorkerClientImpl() |
251 { | 256 { |
252 } | 257 } |
253 | 258 |
254 } // namespace WebKit | 259 } // namespace WebKit |
255 | 260 |
256 #endif | 261 #endif |
OLD | NEW |