Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1591453005: Add metrics regarding concurrent audible tabs in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698