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

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

Issue 1706353002: Added the selected text marker range to the dictionary for the selection change notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged with dmazzoni's change to GetFocus. Created 4 years, 10 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
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c025df58ca3805456291695e7e0e9a8ee82a0bc2..a993de8e1c7f8756a3a31ce37bca821fd9c3e43e 100644
--- a/content/browser/accessibility/browser_accessibility_manager.h
+++ b/content/browser/accessibility/browser_accessibility_manager.h
@@ -172,12 +172,11 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
// occurred in the tab.
void GotMouseDown();
- // Send a message to the renderer to set focus to this node.
- void SetFocus(const BrowserAccessibility& node);
-
- // Pretend that the given node has focus, for testing only. Doesn't
- // communicate with the renderer and doesn't fire any events.
- void SetFocusLocallyForTesting(BrowserAccessibility* node);
+ // 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);
Mark Mentovai 2016/02/19 17:16:16 Dominic should comment on this.
+ void SetFocus(BrowserAccessibility* node, bool notify);
// Tell the renderer to do the default action for this node.
void DoDefaultAction(const BrowserAccessibility& node);
@@ -249,12 +248,13 @@ class CONTENT_EXPORT BrowserAccessibilityManager : public ui::AXTreeDelegate {
ToBrowserAccessibilityManagerAuraLinux();
#endif
- // Return the object that has focus.
- virtual BrowserAccessibility* GetFocus();
+ // 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);
- // Given a focused node |focus|, returns a descendant of that node if it
- // has an active descendant, otherwise returns |focus|.
- BrowserAccessibility* GetActiveDescendantFocus(BrowserAccessibility* focus);
+ // Return the descentant of the given root that has focus, or that object's
+ // active descendant if it has one.
+ BrowserAccessibility* GetActiveDescendantFocus(BrowserAccessibility* root);
// Returns true if native focus is anywhere in this WebContents or not.
bool NativeViewHasFocus();
@@ -365,6 +365,9 @@ 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_;
dmazzoni 2016/02/19 17:29:24 This is definitely wrong. I got rid of this in my
+
// A mapping from a node id to its wrapper of type BrowserAccessibility.
base::hash_map<int32_t, BrowserAccessibility*> id_wrapper_map_;
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698