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

Issue 2787703004: [Mojo Video Capture] Fix VideoCaptureManager exposing implementation details to clients (Closed)

Created:
3 years, 8 months ago by chfremer
Modified:
3 years, 8 months ago
Reviewers:
emircan, mcasas, miu
CC:
chromium-reviews, posciak+watch_chromium.org, chfremer+watch_chromium.org, jam, feature-media-reviews_chromium.org, darin-cc_chromium.org, xjz+watch_chromium.org, miu+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[Mojo Video Capture] Fix VideoCaptureManager exposing implementation details to clients This CL is supposed to be a pure refactoring. There should be no changes to existing behavior. This is part of a series of CLs with the goal of separating the class VideoCaptureManager from knowledge of things that are going to be private implementation details of the video capture service. The end goal is to have VideoCaptureManager talk to an abstraction that can be implemented by either the video capture Mojo service or the existing (legacy) in-process implementation. Changes in this CL: * In VideoCaptureManager, remove getters/setters that expose implementation details. * In MediaStreamManager, expose a set of static factory methods that allow creating of custom-configured instances as needed by clients (as was previously done post-construction using getters and setters). * Update usage sites * Split class VideoCaptureSystem into interface VideoCaptureSystem and implementation VideoCaptureSystemImpl. This is to enable testing (MediaStreamDispatcherHostTest) to use a mock implementation instead of requiring the existance of a VideoCaptureDeviceFactory. This CL is part of the Mojo Video Capture work. For the bigger picture, see [1] CL19. BUG=584797 TEST= capture_unittests --gtest_filter="*Video*" content_unittests --gtest_filter="*Video*" content_unittests --gtest_filter="*Media*" content_unittests --gtest_filter="*Audio*" content_browsertests --gtest_filter="VideoCaptureBrowserTest.*" [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing Review-Url: https://codereview.chromium.org/2787703004 Cr-Commit-Position: refs/heads/master@{#463080} Committed: https://chromium.googlesource.com/chromium/src/+/76a5bd00357df1a3a0274658a43dabfe277e0382

Patch Set 1 #

Patch Set 2 : Rebase to March 30 #

Patch Set 3 : Merge branch '18b' into 19b #

Patch Set 4 : Pull changes from upstream #

Total comments: 18

Patch Set 5 : Pull more changes from upstream #

Patch Set 6 : Incorporate suggestions from PatchSet 4 #

Patch Set 7 : Rebase to April 5 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -304 lines) Patch
M content/browser/renderer_host/media/media_devices_manager_unittest.cc View 1 2 3 4 5 2 chunks +7 lines, -6 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 1 2 3 4 5 17 chunks +88 lines, -61 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 2 3 4 5 6 3 chunks +11 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 6 chunks +41 lines, -27 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.h View 1 2 3 4 5 6 2 chunks +0 lines, -19 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M media/capture/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M media/capture/video/video_capture_system.h View 1 2 3 4 5 1 chunk +6 lines, -28 lines 0 comments Download
M media/capture/video/video_capture_system.cc View 1 2 3 4 5 1 chunk +0 lines, -126 lines 0 comments Download
A + media/capture/video/video_capture_system_impl.h View 1 2 3 4 5 2 chunks +9 lines, -23 lines 0 comments Download
A + media/capture/video/video_capture_system_impl.cc View 1 2 3 4 5 4 chunks +8 lines, -8 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 35 (26 generated)
chfremer
miu@: PTAL
3 years, 8 months ago (2017-03-30 19:52:00 UTC) #3
chfremer
emircan@: PTAL mcasas@: Optional
3 years, 8 months ago (2017-04-03 18:49:04 UTC) #16
miu
Comments on PS4: https://codereview.chromium.org/2787703004/diff/60001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc File content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc (right): https://codereview.chromium.org/2787703004/diff/60001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc#newcode63 content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc:63: static const char* kRegularVideoDeviceId = "stub_device_0"; ...
3 years, 8 months ago (2017-04-03 21:31:24 UTC) #17
chfremer
miu@: PTAL https://codereview.chromium.org/2787703004/diff/60001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc File content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc (right): https://codereview.chromium.org/2787703004/diff/60001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc#newcode63 content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc:63: static const char* kRegularVideoDeviceId = "stub_device_0"; On ...
3 years, 8 months ago (2017-04-04 21:59:32 UTC) #20
miu
PS6 lgtm. I see your point about constructing objects on the UI thread instead of ...
3 years, 8 months ago (2017-04-05 21:10:00 UTC) #23
emircan
lgtm
3 years, 8 months ago (2017-04-06 20:56:54 UTC) #28
chfremer
On 2017/04/05 21:10:00, miu wrote: > PS6 lgtm. > > I see your point about ...
3 years, 8 months ago (2017-04-07 17:18:28 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2787703004/120001
3 years, 8 months ago (2017-04-07 21:31:40 UTC) #32
commit-bot: I haz the power
3 years, 8 months ago (2017-04-08 00:49:47 UTC) #35
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/76a5bd00357df1a3a0274658a43d...

Powered by Google App Engine
This is Rietveld 408576698