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

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 11166002: Plumb render view ID from audio-related code in renderer through IPCs to AudioRendererHost in brows… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 2 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/pepper/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputBufferSize() { 881 uint32_t PepperPluginDelegateImpl::GetAudioHardwareOutputBufferSize() {
882 return static_cast<uint32_t>(audio_hardware::GetOutputBufferSize()); 882 return static_cast<uint32_t>(audio_hardware::GetOutputBufferSize());
883 } 883 }
884 884
885 webkit::ppapi::PluginDelegate::PlatformAudioOutput* 885 webkit::ppapi::PluginDelegate::PlatformAudioOutput*
886 PepperPluginDelegateImpl::CreateAudioOutput( 886 PepperPluginDelegateImpl::CreateAudioOutput(
887 uint32_t sample_rate, 887 uint32_t sample_rate,
888 uint32_t sample_count, 888 uint32_t sample_count,
889 webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client) { 889 webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client) {
890 return PepperPlatformAudioOutputImpl::Create( 890 return PepperPlatformAudioOutputImpl::Create(
891 render_view_->GetRoutingID(),
891 static_cast<int>(sample_rate), static_cast<int>(sample_count), client); 892 static_cast<int>(sample_rate), static_cast<int>(sample_count), client);
892 } 893 }
893 894
894 webkit::ppapi::PluginDelegate::PlatformAudioInput* 895 webkit::ppapi::PluginDelegate::PlatformAudioInput*
895 PepperPluginDelegateImpl::CreateAudioInput( 896 PepperPluginDelegateImpl::CreateAudioInput(
896 const std::string& device_id, 897 const std::string& device_id,
897 uint32_t sample_rate, 898 uint32_t sample_rate,
898 uint32_t sample_count, 899 uint32_t sample_count,
899 webkit::ppapi::PluginDelegate::PlatformAudioInputClient* client) { 900 webkit::ppapi::PluginDelegate::PlatformAudioInputClient* client) {
900 return PepperPlatformAudioInputImpl::Create( 901 return PepperPlatformAudioInputImpl::Create(
902 render_view_->GetRoutingID(),
901 AsWeakPtr(), device_id, static_cast<int>(sample_rate), 903 AsWeakPtr(), device_id, static_cast<int>(sample_rate),
902 static_cast<int>(sample_count), client); 904 static_cast<int>(sample_count), client);
903 } 905 }
904 906
905 // If a broker has not already been created for this plugin, creates one. 907 // If a broker has not already been created for this plugin, creates one.
906 webkit::ppapi::PluginDelegate::Broker* 908 webkit::ppapi::PluginDelegate::Broker*
907 PepperPluginDelegateImpl::ConnectToBroker( 909 PepperPluginDelegateImpl::ConnectToBroker(
908 webkit::ppapi::PPB_Broker_Impl* client) { 910 webkit::ppapi::PPB_Broker_Impl* client) {
909 DCHECK(client); 911 DCHECK(client);
910 912
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 else 1891 else
1890 return render_view_->mouse_lock_dispatcher(); 1892 return render_view_->mouse_lock_dispatcher();
1891 } 1893 }
1892 1894
1893 webkit_glue::ClipboardClient* 1895 webkit_glue::ClipboardClient*
1894 PepperPluginDelegateImpl::CreateClipboardClient() const { 1896 PepperPluginDelegateImpl::CreateClipboardClient() const {
1895 return new RendererClipboardClient; 1897 return new RendererClipboardClient;
1896 } 1898 }
1897 1899
1898 } // namespace content 1900 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698