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

Side by Side Diff: ui/views/focus/focus_search.cc

Issue 9021002: views: Rename IsAccessibilityFocusableInRootView() to just IsAccessibilityFocusable(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/focus/focus_search.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "ui/views/focus/focus_manager.h" 6 #include "ui/views/focus/focus_manager.h"
7 #include "ui/views/focus/focus_search.h" 7 #include "ui/views/focus/focus_search.h"
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 9
10 namespace views { 10 namespace views {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 bool FocusSearch::IsViewFocusableCandidate(View* v, int skip_group_id) { 95 bool FocusSearch::IsViewFocusableCandidate(View* v, int skip_group_id) {
96 return IsFocusable(v) && 96 return IsFocusable(v) &&
97 (v->IsGroupFocusTraversable() || skip_group_id == -1 || 97 (v->IsGroupFocusTraversable() || skip_group_id == -1 ||
98 v->GetGroup() != skip_group_id); 98 v->GetGroup() != skip_group_id);
99 } 99 }
100 100
101 bool FocusSearch::IsFocusable(View* v) { 101 bool FocusSearch::IsFocusable(View* v) {
102 if (accessibility_mode_) 102 if (accessibility_mode_)
103 return v && v->IsAccessibilityFocusableInRootView(); 103 return v && v->IsAccessibilityFocusable();
104
105 return v && v->IsFocusable(); 104 return v && v->IsFocusable();
106 } 105 }
107 106
108 View* FocusSearch::FindSelectedViewForGroup(View* view) { 107 View* FocusSearch::FindSelectedViewForGroup(View* view) {
109 if (view->IsGroupFocusTraversable() || 108 if (view->IsGroupFocusTraversable() ||
110 view->GetGroup() == -1) // No group for that view. 109 view->GetGroup() == -1) // No group for that view.
111 return view; 110 return view;
112 111
113 View* selected_view = view->GetSelectedViewForGroup(view->GetGroup()); 112 View* selected_view = view->GetSelectedViewForGroup(view->GetGroup());
114 if (selected_view) 113 if (selected_view)
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 skip_group_id, 262 skip_group_id,
264 focus_traversable, 263 focus_traversable,
265 focus_traversable_view); 264 focus_traversable_view);
266 } 265 }
267 266
268 // We found nothing. 267 // We found nothing.
269 return NULL; 268 return NULL;
270 } 269 }
271 270
272 } // namespace views 271 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/focus/focus_search.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698