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

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: review feedback 5 Created 5 years, 3 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
« no previous file with comments | « chrome/browser/ui/views/desktop_media_picker_views.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7597ec41fa932922976c8e4408ab580e0e932265 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() {}
@@ -443,6 +444,8 @@ DesktopMediaPickerDialogView::DesktopMediaPickerDialogView(
}
list_view_->StartUpdating(dialog_window_id);
+
+ GetInitiallyFocusedView()->RequestFocus();
Peter Kasting 2015/09/24 20:46:56 I've asked several times why this code is still he
gyzhou 2015/10/02 18:51:26 Done.
}
DesktopMediaPickerDialogView::~DesktopMediaPickerDialogView() {}
@@ -495,6 +498,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 ?
« no previous file with comments | « chrome/browser/ui/views/desktop_media_picker_views.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698