| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
| index 6e15855686c45078081e15fff66def1533d51b48..7c673463efcc0cc927ce4e69cdaeb09c61338932 100644
|
| --- a/content/browser/renderer_host/render_view_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_view_host_impl.cc
|
| @@ -166,7 +166,8 @@ RenderViewHostImpl::RenderViewHostImpl(
|
| int routing_id,
|
| int main_frame_routing_id,
|
| bool swapped_out,
|
| - bool hidden)
|
| + bool hidden,
|
| + bool setup_for_testing)
|
| : RenderWidgetHostImpl(widget_delegate,
|
| instance->GetProcess(),
|
| routing_id,
|
| @@ -195,13 +196,24 @@ RenderViewHostImpl::RenderViewHostImpl(
|
| GetProcess()->EnableSendQueue();
|
|
|
| if (ResourceDispatcherHostImpl::Get()) {
|
| + bool has_active_audio = false;
|
| + if (!setup_for_testing) {
|
| + scoped_refptr<AudioRendererHost> arh =
|
| + static_cast<RenderProcessHostImpl*>(GetProcess())
|
| + ->audio_renderer_host();
|
| + if (arh.get())
|
| + has_active_audio = arh->RenderViewHasActiveAudio(GetRoutingID());
|
| + }
|
| BrowserThread::PostTask(
|
| - BrowserThread::IO, FROM_HERE,
|
| + BrowserThread::IO,
|
| + FROM_HERE,
|
| base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostCreated,
|
| base::Unretained(ResourceDispatcherHostImpl::Get()),
|
| - GetProcess()->GetID(), GetRoutingID(), !is_hidden()));
|
| + GetProcess()->GetID(),
|
| + GetRoutingID(),
|
| + !is_hidden(),
|
| + has_active_audio));
|
| }
|
| -
|
| #if defined(ENABLE_BROWSER_CDMS)
|
| media_web_contents_observer_.reset(new MediaWebContentsObserver(this));
|
| #endif
|
|
|