| OLD | NEW |
| 1 // Copyright (c) 2012 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/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 } | 126 } |
| 127 | 127 |
| 128 bool WorkerWebKitPlatformSupportImpl::isLinkVisited( | 128 bool WorkerWebKitPlatformSupportImpl::isLinkVisited( |
| 129 unsigned long long link_hash) { | 129 unsigned long long link_hash) { |
| 130 NOTREACHED(); | 130 NOTREACHED(); |
| 131 return false; | 131 return false; |
| 132 } | 132 } |
| 133 | 133 |
| 134 WebMessagePortChannel* | 134 WebMessagePortChannel* |
| 135 WorkerWebKitPlatformSupportImpl::createMessagePortChannel() { | 135 WorkerWebKitPlatformSupportImpl::createMessagePortChannel() { |
| 136 return new WebMessagePortChannelImpl(child_thread_loop_); | 136 return new WebMessagePortChannelImpl(child_thread_loop_.get()); |
| 137 } | 137 } |
| 138 | 138 |
| 139 void WorkerWebKitPlatformSupportImpl::setCookies( | 139 void WorkerWebKitPlatformSupportImpl::setCookies( |
| 140 const WebURL& url, | 140 const WebURL& url, |
| 141 const WebURL& first_party_for_cookies, | 141 const WebURL& first_party_for_cookies, |
| 142 const WebString& value) { | 142 const WebString& value) { |
| 143 NOTREACHED(); | 143 NOTREACHED(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 WebString WorkerWebKitPlatformSupportImpl::cookies( | 146 WebString WorkerWebKitPlatformSupportImpl::cookies( |
| (...skipping 22 matching lines...) Expand all Loading... |
| 169 const WebString& key, const WebString& old_value, | 169 const WebString& key, const WebString& old_value, |
| 170 const WebString& new_value, const WebString& origin, | 170 const WebString& new_value, const WebString& origin, |
| 171 const WebKit::WebURL& url, bool is_local_storage) { | 171 const WebKit::WebURL& url, bool is_local_storage) { |
| 172 NOTREACHED(); | 172 NOTREACHED(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 Platform::FileHandle | 175 Platform::FileHandle |
| 176 WorkerWebKitPlatformSupportImpl::databaseOpenFile( | 176 WorkerWebKitPlatformSupportImpl::databaseOpenFile( |
| 177 const WebString& vfs_file_name, int desired_flags) { | 177 const WebString& vfs_file_name, int desired_flags) { |
| 178 return DatabaseUtil::DatabaseOpenFile( | 178 return DatabaseUtil::DatabaseOpenFile( |
| 179 vfs_file_name, desired_flags, sync_message_filter_); | 179 vfs_file_name, desired_flags, sync_message_filter_.get()); |
| 180 } | 180 } |
| 181 | 181 |
| 182 int WorkerWebKitPlatformSupportImpl::databaseDeleteFile( | 182 int WorkerWebKitPlatformSupportImpl::databaseDeleteFile( |
| 183 const WebString& vfs_file_name, bool sync_dir) { | 183 const WebString& vfs_file_name, bool sync_dir) { |
| 184 return DatabaseUtil::DatabaseDeleteFile( | 184 return DatabaseUtil::DatabaseDeleteFile( |
| 185 vfs_file_name, sync_dir, sync_message_filter_); | 185 vfs_file_name, sync_dir, sync_message_filter_.get()); |
| 186 } | 186 } |
| 187 | 187 |
| 188 long WorkerWebKitPlatformSupportImpl::databaseGetFileAttributes( | 188 long WorkerWebKitPlatformSupportImpl::databaseGetFileAttributes( |
| 189 const WebString& vfs_file_name) { | 189 const WebString& vfs_file_name) { |
| 190 return DatabaseUtil::DatabaseGetFileAttributes( | 190 return DatabaseUtil::DatabaseGetFileAttributes(vfs_file_name, |
| 191 vfs_file_name, sync_message_filter_); | 191 sync_message_filter_.get()); |
| 192 } | 192 } |
| 193 | 193 |
| 194 long long WorkerWebKitPlatformSupportImpl::databaseGetFileSize( | 194 long long WorkerWebKitPlatformSupportImpl::databaseGetFileSize( |
| 195 const WebString& vfs_file_name) { | 195 const WebString& vfs_file_name) { |
| 196 return DatabaseUtil::DatabaseGetFileSize( | 196 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name, |
| 197 vfs_file_name, sync_message_filter_); | 197 sync_message_filter_.get()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 long long WorkerWebKitPlatformSupportImpl::databaseGetSpaceAvailableForOrigin( | 200 long long WorkerWebKitPlatformSupportImpl::databaseGetSpaceAvailableForOrigin( |
| 201 const WebString& origin_identifier) { | 201 const WebString& origin_identifier) { |
| 202 return DatabaseUtil::DatabaseGetSpaceAvailable( | 202 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier, |
| 203 origin_identifier, sync_message_filter_); | 203 sync_message_filter_.get()); |
| 204 } | 204 } |
| 205 | 205 |
| 206 WebKit::WebIDBFactory* WorkerWebKitPlatformSupportImpl::idbFactory() { | 206 WebKit::WebIDBFactory* WorkerWebKitPlatformSupportImpl::idbFactory() { |
| 207 if (!web_idb_factory_) | 207 if (!web_idb_factory_) |
| 208 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); | 208 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); |
| 209 return web_idb_factory_.get(); | 209 return web_idb_factory_.get(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 WebMimeRegistry::SupportsType | 212 WebMimeRegistry::SupportsType |
| 213 WorkerWebKitPlatformSupportImpl::supportsMIMEType( | 213 WorkerWebKitPlatformSupportImpl::supportsMIMEType( |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 return base::FilePath(file_extension).AsUTF16Unsafe(); | 290 return base::FilePath(file_extension).AsUTF16Unsafe(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { | 293 WebBlobRegistry* WorkerWebKitPlatformSupportImpl::blobRegistry() { |
| 294 if (!blob_registry_.get() && thread_safe_sender_.get()) | 294 if (!blob_registry_.get() && thread_safe_sender_.get()) |
| 295 blob_registry_.reset(new WebBlobRegistryImpl(thread_safe_sender_.get())); | 295 blob_registry_.reset(new WebBlobRegistryImpl(thread_safe_sender_.get())); |
| 296 return blob_registry_.get(); | 296 return blob_registry_.get(); |
| 297 } | 297 } |
| 298 | 298 |
| 299 } // namespace content | 299 } // namespace content |
| OLD | NEW |