Remove IPC struct traits [1] for content::MediaStreamDevice by using Mojom StructTraits. [1] https://cs.chromium.org/chromium/src/content/common/media/media_stream_param_traits.h?q=media_stream_param_traits&dr&l=23
I am doing this now, because it simplifies removal of some legacy IPC code from video capture that I am looking to remove.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3b9b66313be935e3724ad848495c7d9bb98b4feb commit 3b9b66313be935e3724ad848495c7d9bb98b4feb Author: Christian Fremerey <chfremer@chromium.org> Date: Thu Oct 04 20:30:10 2018 Migrate MediaStreamDevice IPC to Mojo Native struct MediaStreamDevice is currently used with Mojo IPC via a [native] mapping. This CL replaces that with a full Mojo struct and adds corresponding mojom_traits for typemapping to the native struct. The legacy IPC mapping for the struct is removed. The native struct is kept, because when using the Mojo struct instead, the usages end up being of type content::mojom::MediaStreamDevicePtr, which is move-only. It could in theory be cloned using explicit calls to Clone(), but this is inconvenient when trying to copy std::vector<content::mojom::MediaStreamDevicePtr>, and we would have to provide custom clone logic, because field |AudioParameters input| is still a native struct and cannot be cloned automatically. This CL also replaces the native struct media::DisplayMediaInformation with a Mojo struct. Here, the native struct is removed completely. Bug: 788693 Change-Id: Idcbc1c322d2889ff90c9fcb0c24b37418d65c2d0 Reviewed-on: https://chromium-review.googlesource.com/c/1247039 Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Mustafa Emre Acer <meacer@chromium.org> Commit-Queue: Christian Fremerey <chfremer@chromium.org> Cr-Commit-Position: refs/heads/master@{#596833} [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/chrome/browser/media/webrtc/desktop_capture_devices_util.cc [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/browser/renderer_host/media/media_stream_manager.cc [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/common/BUILD.gn [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/common/media/media_stream.mojom [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/common/media/media_stream.typemap [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/common/media/media_stream_mojom_traits.cc [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/common/media/media_stream_mojom_traits.h [delete] https://crrev.com/680b1dcdf1ffe8da943772810e4e93666ebb5adf/content/common/media/media_stream_param_traits.cc [delete] https://crrev.com/680b1dcdf1ffe8da943772810e4e93666ebb5adf/content/common/media/media_stream_param_traits.h [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/public/common/BUILD.gn [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/public/common/media_stream_request.cc [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/public/common/media_stream_request.h [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/renderer/media/stream/media_stream_constraints_util_video_device.cc [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/renderer/media/stream/media_stream_constraints_util_video_device.h [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/content/renderer/media/stream/media_stream_video_track.cc [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/media/base/BUILD.gn [delete] https://crrev.com/680b1dcdf1ffe8da943772810e4e93666ebb5adf/media/base/display_media_information.cc [delete] https://crrev.com/680b1dcdf1ffe8da943772810e4e93666ebb5adf/media/base/display_media_information.h [modify] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/media/mojo/interfaces/BUILD.gn [add] https://crrev.com/3b9b66313be935e3724ad848495c7d9bb98b4feb/media/mojo/interfaces/display_media_information.mojom
Comment 1 by chfremer@chromium.org
, Sep 26