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

Unified Diff: ui/views/widget/widget.cc

Issue 23475012: Fixes focus traversal bug (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ShouldAdvanceFocusToTopLevelWidget Created 7 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 | « ui/views/widget/widget.h ('k') | ui/views/widget/widget_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 4bf2a850f05b01e105f8afe61e534f34ea5077da..c96862163f5d8e23b7600a3c4e543af4ed9bf7d5 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -86,10 +86,15 @@ class DefaultWidgetDelegate : public WidgetDelegate {
virtual const Widget* GetWidget() const OVERRIDE {
return widget_;
}
-
virtual bool CanActivate() const OVERRIDE {
return can_activate_;
}
+ virtual bool ShouldAdvanceFocusToTopLevelWidget() const OVERRIDE {
+ // In most situations where a Widget is used without a delegate the Widget
+ // is used as a container, so that we want focus to advance to the parent. A
dmazzoni 2013/09/04 21:07:17 nit: parent -> top-level widget
+ // good example of this is the find bar.
+ return true;
+ }
private:
Widget* widget_;
« no previous file with comments | « ui/views/widget/widget.h ('k') | ui/views/widget/widget_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698