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/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) | 324 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)) |
325 web_idb_factory_.reset(WebIDBFactory::create()); | 325 web_idb_factory_.reset(WebIDBFactory::create()); |
326 else | 326 else |
327 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); | 327 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); |
328 } | 328 } |
329 return web_idb_factory_.get(); | 329 return web_idb_factory_.get(); |
330 } | 330 } |
331 | 331 |
332 void RendererWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyP
ath( | 332 void RendererWebKitPlatformSupportImpl::createIDBKeysFromSerializedValuesAndKeyP
ath( |
333 const WebVector<WebSerializedScriptValue>& values, | 333 const WebVector<WebSerializedScriptValue>& values, |
334 const WebString& keyPath, | 334 const WebIDBKeyPath& keyPath, |
335 WebVector<WebIDBKey>& keys_out) { | 335 WebVector<WebIDBKey>& keys_out) { |
336 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); | 336 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); |
337 WebVector<WebIDBKey> keys(values.size()); | 337 WebVector<WebIDBKey> keys(values.size()); |
338 for (size_t i = 0; i < values.size(); ++i) { | 338 for (size_t i = 0; i < values.size(); ++i) { |
339 keys[i] = WebIDBKey::createFromValueAndKeyPath( | 339 keys[i] = WebIDBKey::createFromValueAndKeyPath( |
340 values[i], WebIDBKeyPath::create(keyPath)); | 340 values[i], keyPath); |
341 } | 341 } |
342 keys_out.swap(keys); | 342 keys_out.swap(keys); |
343 } | 343 } |
344 | 344 |
345 WebSerializedScriptValue | 345 WebSerializedScriptValue |
346 RendererWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue( | 346 RendererWebKitPlatformSupportImpl::injectIDBKeyIntoSerializedValue( |
347 const WebIDBKey& key, | 347 const WebIDBKey& key, |
348 const WebSerializedScriptValue& value, | 348 const WebSerializedScriptValue& value, |
349 const WebString& keyPath) { | 349 const WebIDBKeyPath& keyPath) { |
350 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); | 350 DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess)); |
351 return WebIDBKey::injectIDBKeyIntoSerializedValue( | 351 return WebIDBKey::injectIDBKeyIntoSerializedValue( |
352 key, value, WebIDBKeyPath::create(keyPath)); | 352 key, value, keyPath); |
353 } | 353 } |
354 | 354 |
355 //------------------------------------------------------------------------------ | 355 //------------------------------------------------------------------------------ |
356 | 356 |
357 WebFileSystem* RendererWebKitPlatformSupportImpl::fileSystem() { | 357 WebFileSystem* RendererWebKitPlatformSupportImpl::fileSystem() { |
358 if (!web_file_system_.get()) | 358 if (!web_file_system_.get()) |
359 web_file_system_.reset(new WebFileSystemImpl()); | 359 web_file_system_.reset(new WebFileSystemImpl()); |
360 return web_file_system_.get(); | 360 return web_file_system_.get(); |
361 } | 361 } |
362 | 362 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 DCHECK(render_thread); | 728 DCHECK(render_thread); |
729 if (!render_thread) | 729 if (!render_thread) |
730 return NULL; | 730 return NULL; |
731 return render_thread->CreateMediaStreamCenter(client); | 731 return render_thread->CreateMediaStreamCenter(client); |
732 } | 732 } |
733 | 733 |
734 GpuChannelHostFactory* | 734 GpuChannelHostFactory* |
735 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { | 735 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { |
736 return RenderThreadImpl::current(); | 736 return RenderThreadImpl::current(); |
737 } | 737 } |
OLD | NEW |