Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 21ca407b9e5bebb5128702dd2890e1842d230244..a12996fe6d52d1dace41c5caf480a9a4caa71726 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1275,8 +1275,7 @@ void WebContentsImpl::SetAudioMuted(bool mute) { |
FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
DidUpdateAudioMutingState(mute)); |
- // Notification for UI updates in response to the changed muting state. |
- NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
+ OnAudioStateChanged(!mute && audio_stream_monitor_.IsCurrentlyAudible()); |
} |
bool WebContentsImpl::IsConnectedToBluetoothDevice() const { |
@@ -1336,6 +1335,13 @@ void WebContentsImpl::NotifyNavigationStateChanged( |
GetOuterWebContents()->NotifyNavigationStateChanged(changed_flags); |
} |
+void WebContentsImpl::OnAudioStateChanged(bool is_audio_playing) { |
+ Send(new ViewMsg_AudioStateChanged(GetRoutingID(), is_audio_playing)); |
+ |
+ // Notification for UI updates in response to the changed muting state. |
+ NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
+} |
+ |
base::TimeTicks WebContentsImpl::GetLastActiveTime() const { |
return last_active_time_; |
} |