| 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/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { | 626 double RendererWebKitPlatformSupportImpl::audioHardwareSampleRate() { |
| 627 RenderThreadImpl* thread = RenderThreadImpl::current(); | 627 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 628 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); | 628 return thread->GetAudioHardwareConfig()->GetOutputSampleRate(); |
| 629 } | 629 } |
| 630 | 630 |
| 631 size_t RendererWebKitPlatformSupportImpl::audioHardwareBufferSize() { | 631 size_t RendererWebKitPlatformSupportImpl::audioHardwareBufferSize() { |
| 632 RenderThreadImpl* thread = RenderThreadImpl::current(); | 632 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 633 return thread->GetAudioHardwareConfig()->GetOutputBufferSize(); | 633 return thread->GetAudioHardwareConfig()->GetOutputBufferSize(); |
| 634 } | 634 } |
| 635 | 635 |
| 636 unsigned RendererWebKitPlatformSupportImpl::audioHardwareOutputChannels() { |
| 637 RenderThreadImpl* thread = RenderThreadImpl::current(); |
| 638 return thread->GetAudioHardwareConfig()->GetOutputChannels(); |
| 639 } |
| 640 |
| 636 // TODO(crogers): remove deprecated API as soon as WebKit calls new API. | 641 // TODO(crogers): remove deprecated API as soon as WebKit calls new API. |
| 637 WebAudioDevice* | 642 WebAudioDevice* |
| 638 RendererWebKitPlatformSupportImpl::createAudioDevice( | 643 RendererWebKitPlatformSupportImpl::createAudioDevice( |
| 639 size_t buffer_size, | 644 size_t buffer_size, |
| 640 unsigned channels, | 645 unsigned channels, |
| 641 double sample_rate, | 646 double sample_rate, |
| 642 WebAudioDevice::RenderCallback* callback) { | 647 WebAudioDevice::RenderCallback* callback) { |
| 643 return createAudioDevice( | 648 return createAudioDevice( |
| 644 buffer_size, 0, channels, sample_rate, callback, "default"); | 649 buffer_size, 0, channels, sample_rate, callback, "default"); |
| 645 } | 650 } |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 //------------------------------------------------------------------------------ | 894 //------------------------------------------------------------------------------ |
| 890 | 895 |
| 891 GrContext* RendererWebKitPlatformSupportImpl::sharedOffscreenGrContext() { | 896 GrContext* RendererWebKitPlatformSupportImpl::sharedOffscreenGrContext() { |
| 892 if (!shared_offscreen_context_) | 897 if (!shared_offscreen_context_) |
| 893 return NULL; | 898 return NULL; |
| 894 return shared_offscreen_context_->GrContext(); | 899 return shared_offscreen_context_->GrContext(); |
| 895 } | 900 } |
| 896 | 901 |
| 897 | 902 |
| 898 } // namespace content | 903 } // namespace content |
| OLD | NEW |