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

Unified Diff: content/renderer/media/peer_connection_tracker.cc

Issue 2263373003: Android: move peerconnection out of power observer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/peer_connection_tracker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/peer_connection_tracker.cc
diff --git a/content/renderer/media/peer_connection_tracker.cc b/content/renderer/media/peer_connection_tracker.cc
index c76674bde73cbdab54e5e00e6e53aa7016e5ab21..9cd42604e84f18c64b9168733ec7877479653397 100644
--- a/content/renderer/media/peer_connection_tracker.cc
+++ b/content/renderer/media/peer_connection_tracker.cc
@@ -376,10 +376,15 @@ RenderThread* PeerConnectionTracker::SendTarget() {
void PeerConnectionTracker::OnSuspend() {
DCHECK(main_thread_.CalledOnValidThread());
+// On Android 'Suspend' means more of the activity state. So it's better to
+// keep the webrtc call session when user is doing something else or screen
+// is off.
+#if !defined(OS_ANDROID)
for (PeerConnectionIdMap::iterator it = peer_connection_id_map_.begin();
it != peer_connection_id_map_.end(); ++it) {
it->first->CloseClientPeerConnection();
}
+#endif
}
void PeerConnectionTracker::OnStartEventLog(int peer_connection_id,
« no previous file with comments | « no previous file | content/renderer/media/peer_connection_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698