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

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

Issue 8996009: views: Rename IsFocusableInRootView() to just IsFocusable(). (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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
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->IsAccessibilityFocusableInRootView();
104 104
105 return v && v->IsFocusableInRootView(); 105 return v && v->IsFocusable();
106 } 106 }
107 107
108 View* FocusSearch::FindSelectedViewForGroup(View* view) { 108 View* FocusSearch::FindSelectedViewForGroup(View* view) {
109 if (view->IsGroupFocusTraversable() || 109 if (view->IsGroupFocusTraversable() ||
110 view->GetGroup() == -1) // No group for that view. 110 view->GetGroup() == -1) // No group for that view.
111 return view; 111 return view;
112 112
113 View* selected_view = view->GetSelectedViewForGroup(view->GetGroup()); 113 View* selected_view = view->GetSelectedViewForGroup(view->GetGroup());
114 if (selected_view) 114 if (selected_view)
115 return selected_view; 115 return selected_view;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 skip_group_id, 263 skip_group_id,
264 focus_traversable, 264 focus_traversable,
265 focus_traversable_view); 265 focus_traversable_view);
266 } 266 }
267 267
268 // We found nothing. 268 // We found nothing.
269 return NULL; 269 return NULL;
270 } 270 }
271 271
272 } // namespace views 272 } // 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