media picker: don't use TabbedPane for one source type
This change causes the desktop media picker not to use TabbedPane unless there are multiple source types to switch between - otherwise it presents an odd single-tab TabbedPane. Specifically, this change: 1) Renames the pane_ member of DesktopMediaPickerDialogView and makes it optional; 2) Refactors the constructor of that class to add the created views children of the TabbedPane only when there are >1, and otherwise as direct children of the DialogView itself; 3) Overrides GetClassName on that class to aid debugging/inspection; 4) Adds new strings (from discussion with UX) for the dialog title when showing only a single source type; 5) Has DesktopMediaPickerDialogView::GetWindowTitle() use those new strings when appropriate; 6) Makes DesktopMediaPickerViewsBrowserTest's InvokeUi test fill itself with some test data, as an aid to screenshots; 7) Adds a new InvokeUi test to that suite, named "tabs", which shows the UI with only a single source; 8) Adds a new test to that suite, SingleSourceTypeChangesTitle, which validates the changes from (4) & (5); 9) Overrides DesktopMediaTabList::GetHeightForWidth, which is required for it to lay out properly when contained in a BoxLayout directly rather than a TabbedPane; To test this change, use the same steps as CL 1626010, or use InvokeUi. Bug: 964332 Change-Id: I0ba7f47613cfbd76152e7ecbdad34b91230b603c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627919 Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org> Auto-Submit: Elly Fong-Jones <ellyjones@chromium.org> Reviewed-by:Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#663173}
Showing
Please register or sign in to comment