diff options
Diffstat (limited to 'views/focus')
-rw-r--r-- | views/focus/focus_manager.cc | 6 | ||||
-rw-r--r-- | views/focus/focus_search.cc | 6 | ||||
-rw-r--r-- | views/focus/focus_search.h | 7 |
3 files changed, 10 insertions, 9 deletions
diff --git a/views/focus/focus_manager.cc b/views/focus/focus_manager.cc index 733d921..ee70d5b 100644 --- a/views/focus/focus_manager.cc +++ b/views/focus/focus_manager.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -361,8 +361,8 @@ void FocusManager::RestoreFocusedView() { View* view = view_storage->RetrieveView(stored_focused_view_storage_id_); if (view) { - if (ContainsView(view) && - (view->IsFocusable() || view->IsAccessibilityFocusable())) { + if (ContainsView(view) && (view->IsFocusableInRootView() || + view->IsAccessibilityFocusableInRootView())) { SetFocusedViewWithReason(view, kReasonFocusRestore); } } else { diff --git a/views/focus/focus_search.cc b/views/focus/focus_search.cc index eaeb8ac..f3fac86 100644 --- a/views/focus/focus_search.cc +++ b/views/focus/focus_search.cc @@ -102,9 +102,9 @@ bool FocusSearch::IsViewFocusableCandidate(View* v, int skip_group_id) { bool FocusSearch::IsFocusable(View* v) { if (accessibility_mode_) - return v && v->IsAccessibilityFocusable(); - else - return v && v->IsFocusable(); + return v && v->IsAccessibilityFocusableInRootView(); + + return v && v->IsFocusableInRootView(); } View* FocusSearch::FindSelectedViewForGroup(View* view) { diff --git a/views/focus/focus_search.h b/views/focus/focus_search.h index f24864b..d6479c4 100644 --- a/views/focus/focus_search.h +++ b/views/focus/focus_search.h @@ -34,8 +34,8 @@ class FocusSearch { // view to FindNextFocusableView you will always get a valid view // out, even if it's the same view. // - |accessibility_mode| should be true if full keyboard accessibility is - // needed and you want to check IsAccessibilityFocusable(), - // rather than IsFocusable(). + // needed and you want to check IsAccessibilityFocusableInRootView(), + // rather than IsFocusableInRootView(). FocusSearch(View* root, bool cycle, bool accessibility_mode); virtual ~FocusSearch() {} @@ -74,7 +74,8 @@ class FocusSearch { bool IsViewFocusableCandidate(View* v, int skip_group_id); // Convenience method; returns true if a view is not NULL and is focusable - // (checking IsAccessibilityFocusable() if accessibility_mode_ is true). + // (checking IsAccessibilityFocusableInRootView() if accessibility_mode_ is + // true). bool IsFocusable(View* v); // Returns the view selected for the group of the selected view. If the view |