Index: content/browser/renderer_host/media/peer_connection_tracker_host.cc |
diff --git a/content/browser/renderer_host/media/peer_connection_tracker_host.cc b/content/browser/renderer_host/media/peer_connection_tracker_host.cc |
index 9fceb42a8b22123e8b61af89c9b3b20f9d028b25..2b7aa7ff785bf40bee097386cb56c48b10fcefeb 100644 |
--- a/content/browser/renderer_host/media/peer_connection_tracker_host.cc |
+++ b/content/browser/renderer_host/media/peer_connection_tracker_host.cc |
@@ -7,6 +7,7 @@ |
#include "content/browser/media/webrtc/webrtc_eventlog_host.h" |
#include "content/browser/media/webrtc/webrtc_internals.h" |
#include "content/browser/renderer_host/render_process_host_impl.h" |
+#include "content/common/media/media_stream_options.h" |
#include "content/common/media/peer_connection_tracker_messages.h" |
namespace content { |
@@ -16,6 +17,7 @@ PeerConnectionTrackerHost::PeerConnectionTrackerHost( |
WebRTCEventLogHost* event_log_host) |
: BrowserMessageFilter(PeerConnectionTrackerMsgStart), |
render_process_id_(render_process_id), |
+ is_screen_capture_(false), |
event_log_host_(event_log_host) { |
DCHECK(event_log_host); |
} |
@@ -101,16 +103,20 @@ void PeerConnectionTrackerHost::OnAddStats(int lid, |
void PeerConnectionTrackerHost::OnGetUserMedia( |
const std::string& origin, |
bool audio, |
- bool video, |
+ const VideoInfo& video_info, |
const std::string& audio_constraints, |
const std::string& video_constraints) { |
WebRTCInternals::GetInstance()->OnGetUserMedia(render_process_id_, |
peer_pid(), |
origin, |
audio, |
- video, |
+ video_info.video, |
audio_constraints, |
video_constraints); |
+#if defined(OS_ANDROID) |
+ is_screen_capture_ = |
Sergey Ulanov
2016/08/01 18:20:36
There can be multiple media streams, and as far as
braveyao
2016/08/03 00:23:47
Done.
Single flag is necessary on Android. During
Sergey Ulanov
2016/08/19 05:54:15
Then I still think this code won't work correctly,
braveyao
2016/08/23 21:18:54
Yes, this is a problem. Here is a temp solution an
braveyao
2016/08/30 23:06:14
Done.
|
+ video_info.video_stream_source == kMediaStreamSourceScreen; |
+#endif |
} |
void PeerConnectionTrackerHost::OnSuspend() { |
@@ -122,7 +128,7 @@ void PeerConnectionTrackerHost::SendOnSuspendOnUIThread() { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
content::RenderProcessHost* host = |
content::RenderProcessHost::FromID(render_process_id_); |
- if (host) |
+ if (host && !is_screen_capture_) |
Sergey Ulanov
2016/08/01 18:20:36
See my comment above. I think you always want to s
braveyao
2016/08/03 00:23:47
see comments above.
|
host->Send(new PeerConnectionTracker_OnSuspend()); |
} |