OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/worker/worker_webkitplatformsupport_impl.h" | 5 #include "content/worker/worker_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "content/common/database_util.h" | 9 #include "content/common/database_util.h" |
10 #include "content/common/file_system/webfilesystem_impl.h" | 10 #include "content/common/file_system/webfilesystem_impl.h" |
11 #include "content/common/file_utilities_messages.h" | 11 #include "content/common/file_utilities_messages.h" |
12 #include "content/common/indexed_db/proxy_webidbfactory_impl.h" | |
12 #include "content/common/mime_registry_messages.h" | 13 #include "content/common/mime_registry_messages.h" |
13 #include "content/common/webblobregistry_impl.h" | 14 #include "content/common/webblobregistry_impl.h" |
14 #include "content/common/webmessageportchannel_impl.h" | 15 #include "content/common/webmessageportchannel_impl.h" |
15 #include "content/worker/worker_thread.h" | 16 #include "content/worker/worker_thread.h" |
16 #include "ipc/ipc_sync_message_filter.h" | 17 #include "ipc/ipc_sync_message_filter.h" |
17 #include "net/base/mime_util.h" | 18 #include "net/base/mime_util.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
21 #include "webkit/glue/webfileutilities_impl.h" | 22 #include "webkit/glue/webfileutilities_impl.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 long long WorkerWebKitPlatformSupportImpl::databaseGetFileSize( | 202 long long WorkerWebKitPlatformSupportImpl::databaseGetFileSize( |
202 const WebString& vfs_file_name) { | 203 const WebString& vfs_file_name) { |
203 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name); | 204 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name); |
204 } | 205 } |
205 | 206 |
206 long long WorkerWebKitPlatformSupportImpl::databaseGetSpaceAvailableForOrigin( | 207 long long WorkerWebKitPlatformSupportImpl::databaseGetSpaceAvailableForOrigin( |
207 const WebString& origin_identifier) { | 208 const WebString& origin_identifier) { |
208 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier); | 209 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier); |
209 } | 210 } |
210 | 211 |
212 WebKit::WebIDBFactory* WorkerWebKitPlatformSupportImpl::idbFactory() { | |
213 if (!web_idb_factory_.get()) { | |
214 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); | |
michaeln
2012/02/15 03:45:03
RendererWebIDBFactory looks out of place, is the p
dgrogan
2012/02/15 08:34:59
Yep.
Also
| |
215 } | |
216 return web_idb_factory_.get(); | |
217 } | |
218 | |
211 WebMimeRegistry::SupportsType | 219 WebMimeRegistry::SupportsType |
212 WorkerWebKitPlatformSupportImpl::supportsMIMEType( | 220 WorkerWebKitPlatformSupportImpl::supportsMIMEType( |
213 const WebString&) { | 221 const WebString&) { |
214 return WebMimeRegistry::IsSupported; | 222 return WebMimeRegistry::IsSupported; |
215 } | 223 } |
216 | 224 |
217 WebMimeRegistry::SupportsType | 225 WebMimeRegistry::SupportsType |
218 WorkerWebKitPlatformSupportImpl::supportsImageMIMEType( | 226 WorkerWebKitPlatformSupportImpl::supportsImageMIMEType( |
219 const WebString&) { | 227 const WebString&) { |
220 NOTREACHED(); | 228 NOTREACHED(); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
273 new MimeRegistryMsg_GetPreferredExtensionForMimeType( | 281 new MimeRegistryMsg_GetPreferredExtensionForMimeType( |
274 UTF16ToASCII(mime_type), &file_extension)); | 282 UTF16ToASCII(mime_type), &file_extension)); |
275 return webkit_glue::FilePathStringToWebString(file_extension); | 283 return webkit_glue::FilePathStringToWebString(file_extension); |
276 } | 284 } |
277 | 285 |
278 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { | 286 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { |
279 if (!blob_registry_.get()) | 287 if (!blob_registry_.get()) |
280 blob_registry_.reset(new WebBlobRegistryImpl(WorkerThread::current())); | 288 blob_registry_.reset(new WebBlobRegistryImpl(WorkerThread::current())); |
281 return blob_registry_.get(); | 289 return blob_registry_.get(); |
282 } | 290 } |
OLD | NEW |