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

Unified Diff: content/browser/accessibility/browser_accessibility_manager.h

Issue 1815933002: Fix WebView accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add browser test for focusing into a web view Created 4 years, 9 months 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
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);

Powered by Google App Engine
This is Rietveld 408576698