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

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: review comments 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
« no previous file with comments | « content/browser/media/media_web_contents_observer.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/browser/media/media_web_contents_observer.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698