desktop media: use views TableView for tab list
This change makes DesktopMediaPickerViews use a views TableView for the list of tabs to cast, which brings the behavior of this control (especially wrt accessibility) significantly closer to the platform-native behavior and the behavior of other Views UI. Specifically this change: 1) Introduce a new View class named DesktopMediaTabList which uses a TableView to display a DesktopMediaList; 2) Adds a method to DesktopMediaListController to construct a DesktopMediaTabList; 3) Adds two interfaces to DesktopMediaListController: SourceListListener, which listens for changes to a DesktopMediaList, and ListView, which exposes the selection state of a visual source list; 4) Has DesktopMediaListView (the "old" list view class) implement both these interfaces; 5) Has DesktopMediaTabList implement both these interfaces; 6) Adds support to DesktopMediaPickerViewsTestApi for handling either DesktopMediaListView or DesktopMediaTabList; 7) Has DesktopMediaPickerViews use a DesktopMediaTabList (via DesktopMediaListController) when appropriate; 8) Reduces the minimum size of TabDesktopMediaList's thumbnail from 20x20 to 16x16, since TableView requires a 16x16 image; To test this change: From unit_tests run DesktopMediaPickerViewsTest.* From browser_tests run DesktopMediaPickerViewsBrowserTest.* and WebRtcDesktopCaptureBrowserTest.* Future work: Replacing DesktopMediaListView with another class, specialized for displaying a grid of SourceViews but using standard Views layout primitives, and excising the custom ::Layout and ::Paint methods. Bug: 726005 Change-Id: Iaa82711b2ed89ab3f47d6522219252dd290135be Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1555042 Auto-Submit: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by:Thomas Guilbert <tguilbert@chromium.org> Reviewed-by:
Peter Kasting <pkasting@chromium.org> Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Cr-Commit-Position: refs/heads/master@{#649129}
Showing
Please register or sign in to comment