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