Index: ui/wm/core/focus_rules.h |
diff --git a/ui/wm/core/focus_rules.h b/ui/wm/core/focus_rules.h |
index cb9a4ddbd8fa5d0d6a59227d19385a3c9031a9ae..d14607e5c69315b7597b6fade8a8efd6412e29b2 100644 |
--- a/ui/wm/core/focus_rules.h |
+++ b/ui/wm/core/focus_rules.h |
@@ -11,6 +11,10 @@ namespace aura { |
class Window; |
} |
+namespace ui { |
+class Event; |
+} |
+ |
namespace wm { |
// Implemented by an object that establishes the rules about what can be |
@@ -26,9 +30,11 @@ class WM_EXPORT FocusRules { |
virtual bool IsToplevelWindow(aura::Window* window) const = 0; |
// Returns true if |window| can be activated or focused. |
virtual bool CanActivateWindow(aura::Window* window) const = 0; |
- // For CanFocusWindow(), NULL is supported, because NULL is a valid focusable |
- // window (in the case of clearing focus). |
- virtual bool CanFocusWindow(aura::Window* window) const = 0; |
+ // For CanFocusWindow(), nullptr window is supported, because nullptr is a |
+ // valid focusable window (in the case of clearing focus). |
+ // If the provided |event| is not nullptr, check whether for this |event| the |
+ // default focus rules for |window| should be disabled. |
+ virtual bool CanFocusWindow(aura::Window* window, ui::Event* event) const = 0; |
// Returns the toplevel window containing |window|. Not all toplevel windows |
// are activatable, call GetActivatableWindow() instead to return the |