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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/desktop_media_picker_views.h" 5 #include "chrome/browser/ui/views/desktop_media_picker_views.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/media/desktop_media_list.h" 10 #include "chrome/browser/media/desktop_media_list.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 parent_web_contents && 414 parent_web_contents &&
415 !parent_web_contents->GetDelegate()->IsNeverVisible(parent_web_contents); 415 !parent_web_contents->GetDelegate()->IsNeverVisible(parent_web_contents);
416 if (modal_dialog) { 416 if (modal_dialog) {
417 widget = constrained_window::ShowWebModalDialogViews(this, 417 widget = constrained_window::ShowWebModalDialogViews(this,
418 parent_web_contents); 418 parent_web_contents);
419 } else { 419 } else {
420 widget = DialogDelegate::CreateDialogWidget(this, context, NULL); 420 widget = DialogDelegate::CreateDialogWidget(this, context, NULL);
421 widget->Show(); 421 widget->Show();
422 } 422 }
423 423
424 // Enable and request keyboard focus
Sergey Ulanov 2015/09/14 20:59:24 Please add . at the end of the sentence.
gyzhou 2015/09/14 22:51:29 Done.
425 SetFocusable(true);
426 RequestFocus();
427
424 // If the picker is not modal to the calling web contents then it is displayed 428 // If the picker is not modal to the calling web contents then it is displayed
425 // in its own top-level window, so in that case it needs to be filtered out of 429 // in its own top-level window, so in that case it needs to be filtered out of
426 // the list of top-level windows available for capture, and to achieve that 430 // the list of top-level windows available for capture, and to achieve that
427 // the Id is passed to DesktopMediaList. 431 // the Id is passed to DesktopMediaList.
428 DesktopMediaID::Id dialog_window_id = 0; 432 DesktopMediaID::Id dialog_window_id = 0;
429 if (!modal_dialog) { 433 if (!modal_dialog) {
430 #if defined(USE_ASH) 434 #if defined(USE_ASH)
431 if (chrome::IsNativeWindowInAsh(widget->GetNativeWindow())) { 435 if (chrome::IsNativeWindowInAsh(widget->GetNativeWindow())) {
432 dialog_window_id = 436 dialog_window_id =
433 DesktopMediaID::RegisterAuraWindow( 437 DesktopMediaID::RegisterAuraWindow(
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 content::BrowserThread::PostTask( 589 content::BrowserThread::PostTask(
586 content::BrowserThread::UI, FROM_HERE, 590 content::BrowserThread::UI, FROM_HERE,
587 base::Bind(callback_, source)); 591 base::Bind(callback_, source));
588 callback_.Reset(); 592 callback_.Reset();
589 } 593 }
590 594
591 // static 595 // static
592 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() { 596 scoped_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
593 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews()); 597 return scoped_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews());
594 } 598 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698