Chromium Code Reviews| 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..a13073ffe7b99827e48fc034dd9807c937f1693b 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 has_render_process_host_impl) |
| : RenderWidgetHostImpl(widget_delegate, |
| instance->GetProcess(), |
| routing_id, |
| @@ -195,13 +196,24 @@ RenderViewHostImpl::RenderViewHostImpl( |
| GetProcess()->EnableSendQueue(); |
| if (ResourceDispatcherHostImpl::Get()) { |
| + bool has_active_audio = false; |
| + if (has_render_process_host_impl) { |
| + 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)); |
| } |
|
jam
2014/10/01 20:31:38
actually, now that I look at this some more. how a
|
| - |
| #if defined(ENABLE_BROWSER_CDMS) |
| media_web_contents_observer_.reset(new MediaWebContentsObserver(this)); |
| #endif |