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

Unified Diff: content/renderer/pepper/pepper_platform_audio_output_impl.cc

Issue 10835025: Plumb render view ID to media observer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_platform_audio_output_impl.cc
diff --git a/content/renderer/pepper/pepper_platform_audio_output_impl.cc b/content/renderer/pepper/pepper_platform_audio_output_impl.cc
index f964b07de98e319bf4c356c7cf5867e5c29ad34c..539cf9f369c3f499bdc20d2eb09b58964c38ba58 100644
--- a/content/renderer/pepper/pepper_platform_audio_output_impl.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output_impl.cc
@@ -12,17 +12,22 @@
#include "content/common/media/audio_messages.h"
#include "content/renderer/media/audio_hardware.h"
#include "content/renderer/render_thread_impl.h"
+#include "content/renderer/render_view_impl.h"
namespace content {
// static
PepperPlatformAudioOutputImpl* PepperPlatformAudioOutputImpl::Create(
+ RenderViewImpl* render_view,
int sample_rate,
int frames_per_buffer,
webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client) {
scoped_refptr<PepperPlatformAudioOutputImpl> audio_output(
new PepperPlatformAudioOutputImpl);
- if (audio_output->Initialize(sample_rate, frames_per_buffer, client)) {
+ if (audio_output->Initialize(render_view,
+ sample_rate,
+ frames_per_buffer,
+ client)) {
// Balanced by Release invoked in
// PepperPlatformAudioOutputImpl::ShutDownOnIOThread().
return audio_output.release();
@@ -103,6 +108,7 @@ PepperPlatformAudioOutputImpl::PepperPlatformAudioOutputImpl()
}
bool PepperPlatformAudioOutputImpl::Initialize(
+ RenderViewImpl* render_view,
int sample_rate,
int frames_per_buffer,
webkit::ppapi::PluginDelegate::PlatformAudioOutputClient* client) {
@@ -110,6 +116,7 @@ bool PepperPlatformAudioOutputImpl::Initialize(
// Make sure we don't call init more than once.
DCHECK_EQ(0, stream_id_);
+ render_view_ = render_view;
client_ = client;
media::AudioParameters::Format format;
@@ -137,7 +144,8 @@ bool PepperPlatformAudioOutputImpl::Initialize(
void PepperPlatformAudioOutputImpl::InitializeOnIOThread(
const media::AudioParameters& params) {
stream_id_ = filter_->AddDelegate(this);
- filter_->Send(new AudioHostMsg_CreateStream(stream_id_, params));
+ filter_->Send(new AudioHostMsg_CreateStream(
+ render_view_->routing_id(), stream_id_, params));
}
void PepperPlatformAudioOutputImpl::StartPlaybackOnIOThread() {
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_output_impl.h ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698