Reland [Mojo Video Capture] Hook up video capture service behind a feature flag
Link to original CL: https://codereview.chromium.org/2867213004/
PatchSet 1 is the state as reviewed previously.
PatchSet 2 fixes the reasons for the revert.
Description of issues
---------------------
1.) Webkit Android bots for blink_heap_unittests and webkit_unit_tests fail with
OSError: [Errno 2] No such file or directory: '/b/c/b/WebKit_Android__Nexus4_/src/out/Release/gen/services/video_capture/manifest.json'
2.) MSan tests fail when running VideoCaptureBrowserTest.ReceiveFramesFromFakeCaptureDevice/22
Description of fixes
--------------------
For 1.: Removed an unnecessary data_dep on on the service manifest. Even though
unclear why the particular tests would want to use the manifest file and why
it was not copied, this is likely to fix the issue.
For 2.: It appears that this is an existing issue that was triggered by the
new test cases added in this CL. I am disabling these test cases for now, and
added https://crbug.com/725271 to track the issue.
Original CL description
-----------------------
This CL is part of the Mojo Video Capture work. For the bigger picture,
see [1] CL25.
After this CL, the video capture service can be enabled by starting Chrome with
command-line flag --enable-features=MojoVideoCapture.
Changes in this CL:
* Add a base::Feature kMojoVideoCapture to allow switching the service on and
off.
* Add a class VideoCaptureProviderSwitcher that can route device capture
requests to the service's VideoCaptureProvider while routing screen capture
requests to the InProcessVideoCaptureProvider.
* Hook up the VideoCaptureProviderSwitcher in the factory code in
MediaStreamManager.
* Register video capture service in the service manager context for the Browser
process.
* Remove build flag "enable_mojo_video_capture", since we want the service to
be testable in all builds.
* Forward switches for using fake video capture devices to utility processes.
* Add test cases for exercising the service to VideoCaptureBrowserTest.
BUG=584797
TEST=
content_browsertests --gtest_filter="VideoCaptureBrowserTest.*"
[email protected],[email protected],[email protected],[email protected]
[1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing
Review-Url: https://codereview.chromium.org/2896913002
Cr-Commit-Position: refs/heads/master@{#473902}
22 files changed