On Android phone, when you open a webrtc page by clicking a url in current tab, a...
commit6a79b6d989706ad5d0d3224ce20e7b1570444f19
authorbraveyao <braveyao@chromium.org>
Mon, 14 Sep 2015 09:24:46 +0000 (14 02:24 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 14 Sep 2015 09:25:25 +0000 (14 09:25 +0000)
treee8ea4b838fd5ffc9e643d0f1571059874c2c0ef7
parent648229a3ea1cdaa630ff2ac284ba40480f9aeb49
On Android phone, when you open a webrtc page by clicking a url in current tab, a new tab will be created for it. When you click back to quit the webrtc page, an OnWasShown event will be sent to the previous tab to resume capture device. But if the previous tab doesn't capture at all, the operation will lead to startCapture a second time, which will cause a crash with Camera2 API eventually.
This operation will trigger the "Redundant client configuration" warning in video_capture_controller.cc. So here we return false on that warning then the caller will know it shouldn't start the device again.

BUG=514740
TEST=Manual Test

Review URL: https://codereview.chromium.org/1322113002

Cr-Commit-Position: refs/heads/master@{#348593}
content/browser/renderer_host/media/video_capture_controller.cc
content/browser/renderer_host/media/video_capture_controller.h
content/browser/renderer_host/media/video_capture_manager.cc
content/browser/renderer_host/media/video_capture_manager_unittest.cc