| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 | 1121 |
| 1122 if (mute) { | 1122 if (mute) { |
| 1123 if (!audio_muter_) | 1123 if (!audio_muter_) |
| 1124 audio_muter_.reset(new WebContentsAudioMuter(this)); | 1124 audio_muter_.reset(new WebContentsAudioMuter(this)); |
| 1125 audio_muter_->StartMuting(); | 1125 audio_muter_->StartMuting(); |
| 1126 } else { | 1126 } else { |
| 1127 DCHECK(audio_muter_); | 1127 DCHECK(audio_muter_); |
| 1128 audio_muter_->StopMuting(); | 1128 audio_muter_->StopMuting(); |
| 1129 } | 1129 } |
| 1130 | 1130 |
| 1131 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 1132 DidUpdateAudioMutingState(mute)); |
| 1133 |
| 1131 // Notification for UI updates in response to the changed muting state. | 1134 // Notification for UI updates in response to the changed muting state. |
| 1132 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); | 1135 NotifyNavigationStateChanged(INVALIDATE_TYPE_TAB); |
| 1133 } | 1136 } |
| 1134 | 1137 |
| 1135 bool WebContentsImpl::IsCrashed() const { | 1138 bool WebContentsImpl::IsCrashed() const { |
| 1136 return (crashed_status_ == base::TERMINATION_STATUS_PROCESS_CRASHED || | 1139 return (crashed_status_ == base::TERMINATION_STATUS_PROCESS_CRASHED || |
| 1137 crashed_status_ == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || | 1140 crashed_status_ == base::TERMINATION_STATUS_ABNORMAL_TERMINATION || |
| 1138 crashed_status_ == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || | 1141 crashed_status_ == base::TERMINATION_STATUS_PROCESS_WAS_KILLED || |
| 1139 #if defined(OS_CHROMEOS) | 1142 #if defined(OS_CHROMEOS) |
| 1140 crashed_status_ == | 1143 crashed_status_ == |
| (...skipping 3595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4736 const WebContentsObserver::MediaPlayerId& id) { | 4739 const WebContentsObserver::MediaPlayerId& id) { |
| 4737 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4740 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4738 } | 4741 } |
| 4739 | 4742 |
| 4740 void WebContentsImpl::MediaStoppedPlaying( | 4743 void WebContentsImpl::MediaStoppedPlaying( |
| 4741 const WebContentsObserver::MediaPlayerId& id) { | 4744 const WebContentsObserver::MediaPlayerId& id) { |
| 4742 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4745 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4743 } | 4746 } |
| 4744 | 4747 |
| 4745 } // namespace content | 4748 } // namespace content |
| OLD | NEW |