| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 | 550 |
| 551 WebKit::WebGraphicsContext3D* | 551 WebKit::WebGraphicsContext3D* |
| 552 RendererWebKitPlatformSupportImpl::createGraphicsContext3D() { | 552 RendererWebKitPlatformSupportImpl::createGraphicsContext3D() { |
| 553 // The WebGraphicsContext3DInProcessImpl code path is used for | 553 // The WebGraphicsContext3DInProcessImpl code path is used for |
| 554 // layout tests (though not through this code) as well as for | 554 // layout tests (though not through this code) as well as for |
| 555 // debugging and bringing up new ports. | 555 // debugging and bringing up new ports. |
| 556 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { | 556 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { |
| 557 return new webkit::gpu::WebGraphicsContext3DInProcessImpl( | 557 return new webkit::gpu::WebGraphicsContext3DInProcessImpl( |
| 558 gfx::kNullPluginWindow); | 558 gfx::kNullPluginWindow, NULL); |
| 559 } else { | 559 } else { |
| 560 #if defined(ENABLE_GPU) | 560 #if defined(ENABLE_GPU) |
| 561 return new WebGraphicsContext3DCommandBufferImpl(); | 561 return new WebGraphicsContext3DCommandBufferImpl(); |
| 562 #else | 562 #else |
| 563 return NULL; | 563 return NULL; |
| 564 #endif | 564 #endif |
| 565 } | 565 } |
| 566 } | 566 } |
| 567 | 567 |
| 568 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { | 568 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 | 603 |
| 604 //------------------------------------------------------------------------------ | 604 //------------------------------------------------------------------------------ |
| 605 | 605 |
| 606 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { | 606 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { |
| 607 // RenderThreadImpl::current can be NULL when running some tests. | 607 // RenderThreadImpl::current can be NULL when running some tests. |
| 608 if (!blob_registry_.get() && RenderThreadImpl::current()) { | 608 if (!blob_registry_.get() && RenderThreadImpl::current()) { |
| 609 blob_registry_.reset(new WebBlobRegistryImpl(RenderThreadImpl::Get())); | 609 blob_registry_.reset(new WebBlobRegistryImpl(RenderThreadImpl::Get())); |
| 610 } | 610 } |
| 611 return blob_registry_.get(); | 611 return blob_registry_.get(); |
| 612 } | 612 } |
| OLD | NEW |