| 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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1178 | 1178 |
| 1179 void WebContentsImpl::NotifyNavigationStateChanged( | 1179 void WebContentsImpl::NotifyNavigationStateChanged( |
| 1180 InvalidateTypes changed_flags) { | 1180 InvalidateTypes changed_flags) { |
| 1181 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 | 1181 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466285 |
| 1182 // is fixed. | 1182 // is fixed. |
| 1183 tracked_objects::ScopedTracker tracking_profile( | 1183 tracked_objects::ScopedTracker tracking_profile( |
| 1184 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 1184 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 1185 "466285 WebContentsImpl::NotifyNavigationStateChanged")); | 1185 "466285 WebContentsImpl::NotifyNavigationStateChanged")); |
| 1186 // Notify the media observer of potential audibility changes. | 1186 // Notify the media observer of potential audibility changes. |
| 1187 if (changed_flags & INVALIDATE_TYPE_TAB) { | 1187 if (changed_flags & INVALIDATE_TYPE_TAB) { |
| 1188 media_web_contents_observer_->MaybeUpdateAudibleState( | 1188 media_web_contents_observer_->MaybeUpdateAudibleState(); |
| 1189 AudioStreamMonitor::monitoring_available() && WasRecentlyAudible()); | |
| 1190 } | 1189 } |
| 1191 | 1190 |
| 1192 if (delegate_) | 1191 if (delegate_) |
| 1193 delegate_->NavigationStateChanged(this, changed_flags); | 1192 delegate_->NavigationStateChanged(this, changed_flags); |
| 1194 } | 1193 } |
| 1195 | 1194 |
| 1196 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { | 1195 base::TimeTicks WebContentsImpl::GetLastActiveTime() const { |
| 1197 return last_active_time_; | 1196 return last_active_time_; |
| 1198 } | 1197 } |
| 1199 | 1198 |
| (...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4750 const WebContentsObserver::MediaPlayerId& id) { | 4749 const WebContentsObserver::MediaPlayerId& id) { |
| 4751 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); | 4750 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying(id)); |
| 4752 } | 4751 } |
| 4753 | 4752 |
| 4754 void WebContentsImpl::MediaStoppedPlaying( | 4753 void WebContentsImpl::MediaStoppedPlaying( |
| 4755 const WebContentsObserver::MediaPlayerId& id) { | 4754 const WebContentsObserver::MediaPlayerId& id) { |
| 4756 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); | 4755 FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStoppedPlaying(id)); |
| 4757 } | 4756 } |
| 4758 | 4757 |
| 4759 } // namespace content | 4758 } // namespace content |
| OLD | NEW |