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/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 } | 610 } |
611 | 611 |
612 long long RendererWebKitPlatformSupportImpl::databaseGetSpaceAvailableForOrigin( | 612 long long RendererWebKitPlatformSupportImpl::databaseGetSpaceAvailableForOrigin( |
613 const WebString& origin_identifier) { | 613 const WebString& origin_identifier) { |
614 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier, | 614 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier, |
615 sync_message_filter_.get()); | 615 sync_message_filter_.get()); |
616 } | 616 } |
617 | 617 |
618 WebKit::WebSharedWorkerRepository* | 618 WebKit::WebSharedWorkerRepository* |
619 RendererWebKitPlatformSupportImpl::sharedWorkerRepository() { | 619 RendererWebKitPlatformSupportImpl::sharedWorkerRepository() { |
| 620 #if !defined(OS_ANDROID) |
620 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 621 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
621 switches::kDisableSharedWorkers)) { | 622 switches::kDisableSharedWorkers)) { |
622 return shared_worker_repository_.get(); | 623 return shared_worker_repository_.get(); |
623 } else { | 624 } else { |
624 return NULL; | 625 return NULL; |
625 } | 626 } |
| 627 #else |
| 628 // Shared workers are unsupported on Android. Returning NULL will prevent the |
| 629 // window.SharedWorker constructor from being exposed. http://crbug.com/154571 |
| 630 return NULL; |
| 631 #endif |
626 } | 632 } |
627 | 633 |
628 bool RendererWebKitPlatformSupportImpl::canAccelerate2dCanvas() { | 634 bool RendererWebKitPlatformSupportImpl::canAccelerate2dCanvas() { |
629 RenderThreadImpl* thread = RenderThreadImpl::current(); | 635 RenderThreadImpl* thread = RenderThreadImpl::current(); |
630 GpuChannelHost* host = thread->EstablishGpuChannelSync( | 636 GpuChannelHost* host = thread->EstablishGpuChannelSync( |
631 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); | 637 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); |
632 if (!host) | 638 if (!host) |
633 return false; | 639 return false; |
634 | 640 |
635 const gpu::GPUInfo& gpu_info = host->gpu_info(); | 641 const gpu::GPUInfo& gpu_info = host->gpu_info(); |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 return; | 1074 return; |
1069 QuotaDispatcher::ThreadSpecificInstance( | 1075 QuotaDispatcher::ThreadSpecificInstance( |
1070 thread_safe_sender_.get(), | 1076 thread_safe_sender_.get(), |
1071 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1077 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1072 storage_partition, | 1078 storage_partition, |
1073 static_cast<quota::StorageType>(type), | 1079 static_cast<quota::StorageType>(type), |
1074 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1080 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1075 } | 1081 } |
1076 | 1082 |
1077 } // namespace content | 1083 } // namespace content |
OLD | NEW |