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

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: add a unittest 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
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..c15d8516ee8c37359b66c044e34c8b30ef8e1925 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,

Powered by Google App Engine
This is Rietveld 408576698