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 ec95918e642f32757c476122ba78261f6e688bcf..d9b74899be76af4696a0a060ed88a3201f6f522c 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1278,8 +1278,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 { |
@@ -1339,6 +1338,14 @@ void WebContentsImpl::NotifyNavigationStateChanged( |
GetOuterWebContents()->NotifyNavigationStateChanged(changed_flags); |
} |
+void WebContentsImpl::OnAudioStateChanged(bool is_audio_playing) { |
+ SendToAllFrames( |
+ new FrameMsg_AudioStateChanged(MSG_ROUTING_NONE, 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_; |
} |