Index: content/browser/accessibility/browser_accessibility_manager.h |
diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h |
index 908029b5708399d529f3a6d9ff207727e3f0b23c..077be22798b75ce683c5b60254cceee415d041c6 100644 |
--- a/content/browser/accessibility/browser_accessibility_manager.h |
+++ b/content/browser/accessibility/browser_accessibility_manager.h |
@@ -9,6 +9,7 @@ |
#include <vector> |
+#include "base/callback_forward.h" |
#include "base/containers/hash_tables.h" |
#include "base/macros.h" |
#include "base/memory/scoped_ptr.h" |
@@ -191,6 +192,10 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate { |
// communicate with the renderer and doesn't fire any events. |
void SetFocusLocallyForTesting(BrowserAccessibility* node); |
+ // For testing only, register a function to be called when focus changes |
+ // in any BrowserAccessibilityManager. |
+ static void SetFocusChangeCallbackForTesting(base::Closure callback); |
dcheng
2016/03/24 18:15:11
const base::Closure&
(base::Closure is movable no
dmazzoni
2016/03/25 05:02:22
Done.
|
+ |
// Tell the renderer to do the default action for this node. |
void DoDefaultAction(const BrowserAccessibility& node); |
@@ -261,9 +266,13 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate { |
ToBrowserAccessibilityManagerAuraLinux(); |
#endif |
- // Return the object that has focus. |
+ // Return the object that has focus, starting at the top of the frame tree. |
virtual BrowserAccessibility* GetFocus(); |
+ // Return the object that has focus, only considering this frame and |
+ // descendants. |
+ BrowserAccessibility* GetFocusFromThisOrDescendantFrame(); |
+ |
// Given a focused node |focus|, returns a descendant of that node if it |
// has an active descendant, otherwise returns |focus|. |
BrowserAccessibility* GetActiveDescendantFocus(BrowserAccessibility* focus); |