| 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_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name, | 616 return DatabaseUtil::DatabaseGetFileSize(vfs_file_name, |
| 617 sync_message_filter_.get()); | 617 sync_message_filter_.get()); |
| 618 } | 618 } |
| 619 | 619 |
| 620 long long RendererBlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( | 620 long long RendererBlinkPlatformImpl::databaseGetSpaceAvailableForOrigin( |
| 621 const WebString& origin_identifier) { | 621 const WebString& origin_identifier) { |
| 622 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier, | 622 return DatabaseUtil::DatabaseGetSpaceAvailable(origin_identifier, |
| 623 sync_message_filter_.get()); | 623 sync_message_filter_.get()); |
| 624 } | 624 } |
| 625 | 625 |
| 626 bool RendererBlinkPlatformImpl::databaseSetFileSize( |
| 627 const WebString& vfs_file_name, long long size) { |
| 628 return DatabaseUtil::DatabaseSetFileSize( |
| 629 vfs_file_name, size, sync_message_filter_.get()); |
| 630 } |
| 631 |
| 626 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { | 632 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { |
| 627 RenderThreadImpl* thread = RenderThreadImpl::current(); | 633 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 628 GpuChannelHost* host = thread->EstablishGpuChannelSync( | 634 GpuChannelHost* host = thread->EstablishGpuChannelSync( |
| 629 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); | 635 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); |
| 630 if (!host) | 636 if (!host) |
| 631 return false; | 637 return false; |
| 632 | 638 |
| 633 return host->gpu_info().SupportsAccelerated2dCanvas(); | 639 return host->gpu_info().SupportsAccelerated2dCanvas(); |
| 634 } | 640 } |
| 635 | 641 |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 //------------------------------------------------------------------------------ | 1219 //------------------------------------------------------------------------------ |
| 1214 | 1220 |
| 1215 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1221 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1216 const blink::WebBatteryStatus& status) { | 1222 const blink::WebBatteryStatus& status) { |
| 1217 if (!g_test_battery_status_listener) | 1223 if (!g_test_battery_status_listener) |
| 1218 return; | 1224 return; |
| 1219 g_test_battery_status_listener->updateBatteryStatus(status); | 1225 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1220 } | 1226 } |
| 1221 | 1227 |
| 1222 } // namespace content | 1228 } // namespace content |
| OLD | NEW |