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

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

Issue 1589623002: Keep track of accessibility focus across windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 11 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 311ec192ea794856b9169a6acef051d154b86414..dac156ff021daa6381b7af5a15b33492514f0637 100644
--- a/content/browser/accessibility/browser_accessibility_manager.h
+++ b/content/browser/accessibility/browser_accessibility_manager.h
@@ -172,11 +172,8 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
// occurred in the tab.
void GotMouseDown();
- // Update the focused node to |node|, which may be null.
- // If |notify| is true, send a message to the renderer to set focus
- // to this node.
- void SetFocus(ui::AXNode* node, bool notify);
- void SetFocus(BrowserAccessibility* node, bool notify);
+ // Send a message to the renderer to set focus to this node.
+ void SetFocus(const BrowserAccessibility& node);
// Tell the renderer to do the default action for this node.
void DoDefaultAction(const BrowserAccessibility& node);
@@ -248,13 +245,12 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
ToBrowserAccessibilityManagerAuraLinux();
#endif
- // Return the object that has focus, if it's a descendant of the
- // given root (inclusive). Does not make a new reference.
- virtual BrowserAccessibility* GetFocus(BrowserAccessibility* root);
+ // Return the object that has focus.
+ virtual BrowserAccessibility* GetFocus();
// Return the descentant of the given root that has focus, or that object's
// active descendant if it has one.
- BrowserAccessibility* GetActiveDescendantFocus(BrowserAccessibility* root);
+ BrowserAccessibility* GetActiveDescendantFocus();
// Returns true if native focus is anywhere in this WebContents or not.
bool NativeViewHasFocus();
@@ -340,9 +336,6 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
// The underlying tree of accessibility objects.
scoped_ptr<ui::AXSerializableTree> tree_;
- // The node that currently has focus.
- ui::AXNode* focus_;
-
// A mapping from a node id to its wrapper of type BrowserAccessibility.
base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_;

Powered by Google App Engine
This is Rietveld 408576698