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..a29ec941aa592ed13b540231e4b6cb0e8b8c22f0 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 |
sky
2017/04/17 16:08:48
optional: in comments I think null is fine.
Qiang(Joe) Xu
2017/04/17 17:40:32
Done.
|
+ // valid focusable window (in the case of clearing focus). |
+ // |event| can be provided to check whether for the |event| the default focus |
sky
2017/04/17 16:08:48
How about:
If |event| is non-null it is the event
Qiang(Joe) Xu
2017/04/17 17:40:32
Done.
|
+ // 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 |