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

Unified Diff: chrome/browser/ui/views/desktop_media_picker_views.cc

Issue 1313843003: Enable keyboard navigation for Desktopcapture window selection dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Two more unit tests Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/desktop_media_picker_views.cc
diff --git a/chrome/browser/ui/views/desktop_media_picker_views.cc b/chrome/browser/ui/views/desktop_media_picker_views.cc
index b2975b2b2309b25d1a1208e10f30ccd1bbb3a35c..7c438b20b530dd6999cc66e3a07897776559586f 100644
--- a/chrome/browser/ui/views/desktop_media_picker_views.cc
+++ b/chrome/browser/ui/views/desktop_media_picker_views.cc
@@ -206,6 +206,7 @@ DesktopMediaListView::DesktopMediaListView(
media_list_(media_list.Pass()),
weak_factory_(this) {
media_list_->SetThumbnailSize(gfx::Size(kThumbnailWidth, kThumbnailHeight));
+ SetFocusable(true);
}
DesktopMediaListView::~DesktopMediaListView() {}
@@ -495,6 +496,10 @@ bool DesktopMediaPickerDialogView::IsDialogButtonEnabled(
return true;
}
+views::View* DesktopMediaPickerDialogView::GetInitiallyFocusedView() {
+ return list_view_;
+}
+
base::string16 DesktopMediaPickerDialogView::GetDialogButtonLabel(
ui::DialogButton button) const {
return l10n_util::GetStringUTF16(button == ui::DIALOG_BUTTON_OK ?
@@ -543,6 +548,11 @@ void DesktopMediaPickerDialogView::OnMediaListRowsChanged() {
GetWidget()->CenterWindow(gfx::Size(widget_bound.width(), new_height));
}
+DesktopMediaListView* DesktopMediaPickerDialogView::GetMediaListViewForTesting()
+ const {
+ return list_view_;
+}
+
DesktopMediaSourceView*
DesktopMediaPickerDialogView::GetMediaSourceViewForTesting(int index) const {
if (list_view_->child_count() <= index)

Powered by Google App Engine
This is Rietveld 408576698