Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 9691001: Audio software mixer. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <algorithm>
8 #include <vector>
9
7 #include "base/command_line.h" 10 #include "base/command_line.h"
8 #include "base/file_path.h" 11 #include "base/file_path.h"
9 #include "base/file_util.h" 12 #include "base/file_util.h"
10 #include "base/platform_file.h" 13 #include "base/platform_file.h"
11 #include "base/shared_memory.h" 14 #include "base/shared_memory.h"
12 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
13 #include "content/common/database_util.h" 16 #include "content/common/database_util.h"
14 #include "content/common/fileapi/webblobregistry_impl.h" 17 #include "content/common/fileapi/webblobregistry_impl.h"
15 #include "content/common/fileapi/webfilesystem_impl.h" 18 #include "content/common/fileapi/webfilesystem_impl.h"
16 #include "content/common/file_utilities_messages.h" 19 #include "content/common/file_utilities_messages.h"
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 layout = CHANNEL_LAYOUT_7_0; 647 layout = CHANNEL_LAYOUT_7_0;
645 break; 648 break;
646 case 8: 649 case 8:
647 layout = CHANNEL_LAYOUT_7_1; 650 layout = CHANNEL_LAYOUT_7_1;
648 break; 651 break;
649 default: 652 default:
650 layout = CHANNEL_LAYOUT_STEREO; 653 layout = CHANNEL_LAYOUT_STEREO;
651 } 654 }
652 655
653 AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY, 656 AudioParameters params(AudioParameters::AUDIO_PCM_LOW_LATENCY,
657 false,
654 layout, 658 layout,
655 static_cast<int>(sampleRate), 659 static_cast<int>(sampleRate),
656 16, 660 16,
657 bufferSize); 661 bufferSize);
658 662
659 return new RendererWebAudioDeviceImpl(params, callback); 663 return new RendererWebAudioDeviceImpl(params, callback);
660 } 664 }
661 665
662 //------------------------------------------------------------------------------ 666 //------------------------------------------------------------------------------
663 667
(...skipping 24 matching lines...) Expand all
688 //------------------------------------------------------------------------------ 692 //------------------------------------------------------------------------------
689 693
690 void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) { 694 void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) {
691 if (!gamepad_shared_memory_reader_.get()) 695 if (!gamepad_shared_memory_reader_.get())
692 gamepad_shared_memory_reader_.reset(new content::GamepadSharedMemoryReader); 696 gamepad_shared_memory_reader_.reset(new content::GamepadSharedMemoryReader);
693 gamepad_shared_memory_reader_->SampleGamepads(gamepads); 697 gamepad_shared_memory_reader_->SampleGamepads(gamepads);
694 } 698 }
695 699
696 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( 700 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent(
697 const WebKit::WebURL& url) { 701 const WebKit::WebURL& url) {
698 return WebKitPlatformSupportImpl::userAgent(url); 702 return WebKitPlatformSupportImpl::userAgent(url);
699 } 703 }
700 704
701 void RendererWebKitPlatformSupportImpl::GetPlugins( 705 void RendererWebKitPlatformSupportImpl::GetPlugins(
702 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { 706 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
703 if (!RenderThreadImpl::current()->plugin_refresh_allowed()) 707 if (!RenderThreadImpl::current()->plugin_refresh_allowed())
704 refresh = false; 708 refresh = false;
705 RenderThreadImpl::current()->Send( 709 RenderThreadImpl::current()->Send(
706 new ViewHostMsg_GetPlugins(refresh, plugins)); 710 new ViewHostMsg_GetPlugins(refresh, plugins));
707 } 711 }
708 712
(...skipping 20 matching lines...) Expand all
729 DCHECK(render_thread); 733 DCHECK(render_thread);
730 if (!render_thread) 734 if (!render_thread)
731 return NULL; 735 return NULL;
732 return render_thread->CreateMediaStreamCenter(client); 736 return render_thread->CreateMediaStreamCenter(client);
733 } 737 }
734 738
735 GpuChannelHostFactory* 739 GpuChannelHostFactory*
736 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() { 740 RendererWebKitPlatformSupportImpl::GetGpuChannelHostFactory() {
737 return RenderThreadImpl::current(); 741 return RenderThreadImpl::current();
738 } 742 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698