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/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 RendererWebKitPlatformSupportImpl::createLocalStorageNamespace( | 356 RendererWebKitPlatformSupportImpl::createLocalStorageNamespace( |
357 const WebString& path, unsigned quota) { | 357 const WebString& path, unsigned quota) { |
358 return new WebStorageNamespaceImpl(); | 358 return new WebStorageNamespaceImpl(); |
359 } | 359 } |
360 | 360 |
361 | 361 |
362 //------------------------------------------------------------------------------ | 362 //------------------------------------------------------------------------------ |
363 | 363 |
364 WebIDBFactory* RendererWebKitPlatformSupportImpl::idbFactory() { | 364 WebIDBFactory* RendererWebKitPlatformSupportImpl::idbFactory() { |
365 if (!web_idb_factory_) { | 365 if (!web_idb_factory_) { |
366 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess) && | 366 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); |
367 !CommandLine::ForCurrentProcess()->HasSwitch(switches::kNewIndexedDB)) | |
368 web_idb_factory_.reset(WebIDBFactory::create()); | |
369 else | |
370 web_idb_factory_.reset(new RendererWebIDBFactoryImpl()); | |
371 } | 367 } |
372 return web_idb_factory_.get(); | 368 return web_idb_factory_.get(); |
373 } | 369 } |
374 | 370 |
375 //------------------------------------------------------------------------------ | 371 //------------------------------------------------------------------------------ |
376 | 372 |
377 WebFileSystem* RendererWebKitPlatformSupportImpl::fileSystem() { | 373 WebFileSystem* RendererWebKitPlatformSupportImpl::fileSystem() { |
378 if (!web_file_system_) | 374 if (!web_file_system_) |
379 web_file_system_.reset(new WebFileSystemImpl()); | 375 web_file_system_.reset(new WebFileSystemImpl()); |
380 return web_file_system_.get(); | 376 return web_file_system_.get(); |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
902 } | 898 } |
903 | 899 |
904 //------------------------------------------------------------------------------ | 900 //------------------------------------------------------------------------------ |
905 | 901 |
906 WebKit::WebCompositorSupport* | 902 WebKit::WebCompositorSupport* |
907 RendererWebKitPlatformSupportImpl::compositorSupport() { | 903 RendererWebKitPlatformSupportImpl::compositorSupport() { |
908 return &compositor_support_; | 904 return &compositor_support_; |
909 } | 905 } |
910 | 906 |
911 } // namespace content | 907 } // namespace content |
OLD | NEW |