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 e87e18dcaf6b5cd568197c03a428487ed61f9395..9c3dca25cbd83478477e565d67f525b3f000f902 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -1255,8 +1255,7 @@ void WebContentsImpl::SetAudioMuted(bool mute) { |
for (auto& observer : observers_) |
observer.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 { |
@@ -1316,6 +1315,14 @@ void WebContentsImpl::NotifyNavigationStateChanged( |
GetOuterWebContents()->NotifyNavigationStateChanged(changed_flags); |
} |
+void WebContentsImpl::OnAudioStateChanged(bool is_audio_playing) { |
+ SendPageMessage( |
+ new PageMsg_AudioStateChanged(MSG_ROUTING_NONE, is_audio_playing)); |
+ |
+ // Notification for UI updates in response to the changed muting state. |
miu
2016/11/15 22:04:04
nit: The wording here could be confusing. There ar
altimin
2016/11/16 12:22:32
Addressed in crrev.com/2496173003
|
+ NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
+} |
+ |
base::TimeTicks WebContentsImpl::GetLastActiveTime() const { |
return last_active_time_; |
} |