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

Unified Diff: ui/views/corewm/focus_controller_unittest.cc

Issue 11414304: Fleshes out the basic set of focus rules a bit more. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/corewm/base_focus_rules.cc ('k') | ui/views/corewm/window_modality_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/focus_controller_unittest.cc
===================================================================
--- ui/views/corewm/focus_controller_unittest.cc (revision 170971)
+++ ui/views/corewm/focus_controller_unittest.cc (working copy)
@@ -85,11 +85,15 @@
}
// Overridden from BaseFocusRules:
+ virtual bool SupportsChildActivation(aura::Window* window) OVERRIDE {
+ // In FocusControllerTests, only the RootWindow has activatable children.
+ return window->GetRootWindow() == window;
+ }
virtual bool CanActivateWindow(aura::Window* window) OVERRIDE {
// Restricting focus to a non-activatable child window means the activatable
// parent outside the focus restriction is activatable.
- bool can_activate = CanFocusOrActivate(window) ||
- window->Contains(GetActivatableWindow(focus_restriction_));
+ bool can_activate =
+ CanFocusOrActivate(window) || window->Contains(focus_restriction_);
return can_activate ? BaseFocusRules::CanActivateWindow(window) : false;
}
virtual bool CanFocusWindow(aura::Window* window) OVERRIDE {
« no previous file with comments | « ui/views/corewm/base_focus_rules.cc ('k') | ui/views/corewm/window_modality_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698