| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 return DatabaseUtil::DatabaseSetFileSize( | 611 return DatabaseUtil::DatabaseSetFileSize( |
| 612 vfs_file_name, size, sync_message_filter_.get()); | 612 vfs_file_name, size, sync_message_filter_.get()); |
| 613 } | 613 } |
| 614 | 614 |
| 615 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier( | 615 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier( |
| 616 const blink::WebSecurityOrigin& origin) { | 616 const blink::WebSecurityOrigin& origin) { |
| 617 return WebString::fromUTF8(storage::GetIdentifierFromOrigin( | 617 return WebString::fromUTF8(storage::GetIdentifierFromOrigin( |
| 618 WebSecurityOriginToGURL(origin))); | 618 WebSecurityOriginToGURL(origin))); |
| 619 } | 619 } |
| 620 | 620 |
| 621 cc::FrameSinkId RendererBlinkPlatformImpl::generateFrameSinkId() { |
| 622 return cc::FrameSinkId(RenderThread::Get()->GetClientId(), |
| 623 RenderThread::Get()->GenerateRoutingID()); |
| 624 } |
| 625 |
| 621 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { | 626 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { |
| 622 RenderThreadImpl* thread = RenderThreadImpl::current(); | 627 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 623 // thread can be NULL in tests. | 628 // thread can be NULL in tests. |
| 624 return thread && thread->compositor_task_runner().get(); | 629 return thread && thread->compositor_task_runner().get(); |
| 625 } | 630 } |
| 626 | 631 |
| 627 bool RendererBlinkPlatformImpl::isGPUCompositingEnabled() { | 632 bool RendererBlinkPlatformImpl::isGPUCompositingEnabled() { |
| 628 const base::CommandLine& command_line = | 633 const base::CommandLine& command_line = |
| 629 *base::CommandLine::ForCurrentProcess(); | 634 *base::CommandLine::ForCurrentProcess(); |
| 630 return !command_line.HasSwitch(switches::kDisableGpuCompositing); | 635 return !command_line.HasSwitch(switches::kDisableGpuCompositing); |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 return &trial_token_validator_; | 1296 return &trial_token_validator_; |
| 1292 } | 1297 } |
| 1293 | 1298 |
| 1294 void RendererBlinkPlatformImpl::workerContextCreated( | 1299 void RendererBlinkPlatformImpl::workerContextCreated( |
| 1295 const v8::Local<v8::Context>& worker) { | 1300 const v8::Local<v8::Context>& worker) { |
| 1296 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1301 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
| 1297 worker); | 1302 worker); |
| 1298 } | 1303 } |
| 1299 | 1304 |
| 1300 } // namespace content | 1305 } // namespace content |
| OLD | NEW |